ComfyUI LoRA Training Tutorial: TrainTools-MZ Plugin Turns Model Training into Node-Based Visual Workflow

ComfyUI plugin TrainTools-MZ turns LoRA training into a visual node-based drag-and-drop workflow
ComfyUI-TrainTools-MZ is a ComfyUI plugin developed by MinusZoneAI that wraps kohya-ss/sd-scripts into visual nodes, enabling users to perform LoRA fine-tuning training without command-line operations. This article covers LoRA fundamentals, dataset preparation, key training parameters (learning rate, network rank, epochs, etc.), and the full installation and usage workflow—representing the broader trend of lowering AI training barriers so creators can focus on creating.
ComfyUI LoRA Training Tutorial: TrainTools-MZ Plugin Turns Model Training into Node-Based Visual Workflow
Training LoRA fine-tunes within ComfyUI has long been a pressing need for many AI art enthusiasts. Previously, if you wanted to train a LoRA, you had to open a terminal, set up environments, and type command-line instructions—a process that scared off a huge number of people. Now, the ComfyUI-TrainTools-MZ plugin developed by MinusZoneAI brings LoRA training directly into ComfyUI's node editor—just drag, drop, and connect to start training. Who can resist that?

What Is ComfyUI-TrainTools-MZ? Explained in One Sentence
ComfyUI-TrainTools-MZ is a custom node plugin built specifically for ComfyUI, with one core function: letting you perform LoRA fine-tuning training directly within ComfyUI.
What Exactly Is LoRA? Why Is Everyone Training Them?
Before diving into this plugin, it's worth understanding LoRA itself. LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique proposed by Microsoft Research in 2021. Its core idea is elegantly simple: rather than fine-tuning all parameters of a large model (often billions), insert two low-rank matrices into the model's attention layers and only train these newly added parameters. To use an analogy, if full fine-tuning is demolishing and rebuilding an entire building, LoRA is just redecorating a few rooms—significant results at minimal cost.
For the Stable Diffusion community, LoRA's advantages are overwhelming: trained model files are typically only tens to hundreds of MB (compared to 2-7GB for complete models), training requires significantly less VRAM (consumer GPUs with 8GB can handle it), and they can be stacked like "plugins"—you can load a style LoRA and a character LoRA simultaneously for flexible combinations. This is why LoRA has become the most mainstream personalized fine-tuning approach in the AI art community, with LoRA models on sharing platforms like Civitai far outnumbering other types.
Its underlying dependency is the renowned kohya-ss/sd-scripts—a training script suite that serves as the de facto standard for LoRA training in the Stable Diffusion community.
sd-scripts: The Foundation of Community Training
kohya-ss/sd-scripts, maintained by Japanese developer kohya-ss, is currently the most widely used training framework in the Stable Diffusion ecosystem. It supports LoRA, LyCORIS (various LoRA variants like LoHa, LoKr, etc.), Textual Inversion, DreamBooth, and virtually all mainstream fine-tuning methods, while keeping pace with Stable Diffusion version updates—from SD 1.5 to SDXL to SD3, sd-scripts has consistently been among the first tools to provide training support. With over 10,000 stars on GitHub, and the fact that nearly all LoRA training GUIs (such as kohya_ss GUI, LoRA Easy Training Scripts, etc.) are built upon it, its ecosystem status is undeniable. What TrainTools-MZ essentially does is wrap sd-scripts with a ComfyUI interaction layer, letting you complete the entire training workflow in the familiar node editor without wrestling with command lines in the terminal.
It's written in Python—completely unsurprising. Using any other language in the AI toolchain would be like ordering a salad at a hot pot restaurant.
Why Should ComfyUI Users Care About This LoRA Training Plugin?
ComfyUI has already turned the AI art inference workflow into a visual node-connecting experience, but training has always been a gap. You can elegantly drag and connect nodes in the editor when generating images, but the moment you need to train, you're back to a dark terminal window—the experience disconnect is at maximum.
ComfyUI's Node-Based Architecture: Naturally Suited for Extending Training Capabilities
The most fundamental difference between ComfyUI and Stable Diffusion WebUI (AUTOMATIC1111/Forge) lies in architectural philosophy. WebUI is "form-based"—developers preset the interface, users fill in parameters and click buttons. ComfyUI is "graph-based"—every function is a node, users define data flow through connections, essentially a visual Directed Acyclic Graph (DAG) execution engine. The advantage of this architecture is extreme extensibility: any new feature only needs to be packaged as a node to seamlessly integrate into existing workflows without modifying the main program code.
This is also why making training functionality into ComfyUI nodes is a natural choice—training itself is a process with clear inputs (dataset, base model, parameter configuration) and outputs (LoRA weight files), perfectly fitting the node-based data flow model. You can even chain training nodes with inference nodes: automatically load the new LoRA for test generation after training, forming a closed-loop "train-validate" workflow.
TrainTools-MZ exists to fill this gap. It encapsulates training parameters, dataset configuration, and other elements as ComfyUI nodes, letting you build training pipelines the same way you build workflows. For users already accustomed to ComfyUI's operational logic, the learning curve is virtually zero.
Currently, this project has earned 65 stars and 5 forks on GitHub. The numbers aren't explosive, but considering that "training LoRA within ComfyUI" is an extremely vertical niche, this already qualifies as a star player in a specialized field. The 5 forks mean people are already doing secondary development on it—like a small restaurant that hasn't made the Michelin guide, but chefs from neighboring establishments secretly come to learn the recipes. This kind of word-of-mouth actually says more about quality.
ComfyUI-TrainTools-MZ Installation and Usage Tutorial
Project URL: https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
Installation Steps
- Make sure your ComfyUI environment is running properly
- Clone the plugin repository to the custom_nodes directory, following the project README instructions
- Install dependencies, mainly Python libraries related to kohya-ss/sd-scripts
Preparing Your Training Dataset
Before starting training, dataset quality directly determines the final LoRA results. Here are some key preparation principles:
- Image count: For character LoRAs, 15-50 high-quality images are usually sufficient; style LoRAs may need more (50-200). More isn't always better—10 carefully selected images often outperform 100 images of varying quality.
- Image quality: Resolution should be no less than 512×512 (1024×1024 recommended for SDXL). Avoid blurry images, watermarks, or heavy text overlays. When cropping, preserve key features of the training target.
- Captioning/Tagging: Each image needs a corresponding .txt file with the same name as a caption. You can use auto-tagging tools like BLIP or WD Tagger to generate initial captions, then manually refine them. The core captioning principle: describe everything in the image "except what you want the LoRA to learn." For example, when training a character LoRA, don't write the character's name in the caption, but do describe the background, poses, clothing, and other variables.
- Folder structure: sd-scripts requires a specific directory structure, typically in the format
training_folder/repeat_count_concept_name/, for exampletrain/20_my_character/, where 20 means these images are repeated 20 times per epoch.
Understanding Key Training Parameters
When configuring TrainTools-MZ training nodes in ComfyUI, the following parameters are most critical:
- Learning Rate: Controls how much the model updates at each step. Common values for LoRA training range from 1e-4 to 5e-4. Too high leads to overfitting (the model only copies training images), too low results in insufficient training. SDXL models typically require lower learning rates than SD1.5.
- Network Rank (dimension): Determines the size of the LoRA matrices, directly affecting the model's expressive capacity and file size. Common values are 8, 16, 32, 64, 128. Higher rank means the LoRA can learn more details, but is also more prone to overfitting with larger file sizes. Rank 32-64 is usually sufficient for character LoRAs; complex styles may need 64-128.
- Network Alpha: A scaling factor, typically set to half of Rank or equal to Rank. It affects the actual strength of LoRA weights—the smaller the alpha/rank ratio, the more stable but slower the training.
- Epochs: The number of times the entire dataset is fully traversed. Combined with image count and repeat count, total training steps = images × repeats × epochs / batch_size. Typically train for 10-20 epochs while saving a model every N steps to facilitate selecting the best version.
- Batch Size: Number of images processed simultaneously per step. Limited by VRAM—8GB GPUs typically can only set this to 1, 12GB can try 2-4. Larger batch sizes make training more stable but require proportionally higher learning rates.
- Optimizer: AdamW8bit is the most common choice (saves VRAM). Prodigy and DAdaptation are adaptive learning rate optimizers (no manual learning rate tuning needed, great for beginners).
Starting LoRA Training
- Find the corresponding training nodes in ComfyUI, configure training parameters and mount your dataset as needed
- Run the workflow and wait for your LoRA model to be produced
For specific parameter configurations and node usage, it's recommended to check the project's GitHub page directly, where MinusZoneAI provides fairly detailed documentation.
Post-Training Validation
After training completes, you'll find one or more .safetensors format LoRA files in the designated output directory. Don't just look at the final epoch's output—intermediate checkpoints often hold pleasant surprises. Place these LoRA files in ComfyUI's models/loras/ directory, load them in your generation workflow through the LoRA Loader node, adjust the weight (typically start testing at 0.6-0.8), and verify results with various prompts. If you detect overfitting (generated images look too similar to training data, lacking diversity), try reducing training steps, lowering Rank, or adding regularization images.
Final Thoughts
The ultimate evolution of any toolchain is making you forget the tool itself exists. When training a LoRA becomes as simple as dragging nodes, you can finally focus your energy on the real question: "What do I actually want to train?"
Although ComfyUI-TrainTools-MZ is still a young project, the direction it represents is spot on: lower the barriers and let creators focus on creating. If you've always wanted to train your own LoRA but were scared off by command lines, now's the time to try again.
From a broader perspective, this trend of "training democratization" is unfolding across the entire AI field. From OpenAI's GPT fine-tuning API, to Hugging Face's AutoTrain, to TrainTools-MZ in the ComfyUI ecosystem—tool developers are all doing the same thing: putting work that once required machine learning engineers into the hands of ordinary creators. When everyone can train custom models with their own data, the degree of personalization in AI-generated content will see a qualitative leap—and that's where the true value of LoRA training tools lies.
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.