Training a LoRA used to mean leaving ComfyUI, setting up a separate trainer, and hoping the result loaded back in. ZenTrainer puts the whole job inside ComfyUI, with live sample images next to the loss curve while it trains.
It uses ComfyUI’s own model code and weights. That means the LoRA you train shows up in your normal LoRA loader, ready to use, with no conversion step.
This guide covers the supported models, three ways to install it, a first character LoRA in Simple mode, the Advanced options, where files go, and the fixes for common problems.
- What: ZenTrainer by Nynxz, a free (MIT) LoRA trainer that runs inside ComfyUI, version 0.4.1 at the time of writing.
- Models: MOSS Image, Krea 2, FLUX 3, FLUX.2 Klein, Qwen-Image 2.1, Z-Image, Anima, Fibo 2.0, SDXL and MiniMax H3 (video).
- Install: ComfyUI Manager, search “ZenTrainer”, restart, then click the lotus icon or open
/zentrainer/. Needs ComfyUI 0.41+. - Simple mode: 15-40 photos and a name; it downloads missing models and captions the photos for you.
- Output:
ComfyUI/output/zentrainer/loras/. Datasets live inComfyUI/input/<name>/. - Hardware: NVIDIA (CUDA) or AMD (ROCm) on Windows and Linux. No macOS yet.
What Is ZenTrainer?
ZenTrainer is a ComfyUI extension with its own web interface for training LoRAs. You open it from a lotus icon in ComfyUI’s top bar, and it runs training on the same GPU and model files ComfyUI already uses.
The big selling point is feedback while you train. You see new samples beside the loss curve, you can pause and pull a sample at any time, and you can even change the learning rate mid-run.
| Spec | ZenTrainer |
|---|---|
| Developer | Nynxz (GitHub) |
| Licence | MIT |
| Version | 0.4.1 |
| Needs | ComfyUI 0.41 or newer |
| GPUs | NVIDIA (CUDA), AMD (ROCm) |
| Systems | Windows, Linux (no macOS yet) |
| Adapters | LoRA and LoKr |
| Cloud | Docker image and a one-click Runpod template |
Supported Models
ZenTrainer trains on these model families. The project says some others are listed in the app as untested.
| Model | Type | Our setup guide |
|---|---|---|
| MOSS Image | Image | MOSS-Image in ComfyUI |
| Krea 2 | Image | Krea 2 Turbo |
| FLUX 3 | Image | – |
| FLUX.2 Klein | Image | – |
| Qwen-Image 2.1 | Image | Qwen-Image 2.1 Lightning |
| Z-Image | Image | NitroFusion2 (Z-Image 1-step) |
| Anima | Anime image | Anima Reference Adapter |
| Fibo 2.0 | Image | – |
| SDXL and finetunes | Image | – |
| MiniMax H3 | Video | MiniMax H3 guide |
Note: ZenTrainer does not publish VRAM numbers per model. As a rough rule, you need enough VRAM to run the model comfortably, plus headroom for training. Small models like SDXL and 6B Z-Image are the easiest start on 12-16 GB; large ones like Qwen-Image 2.1 and MiniMax H3 want much more.
How to Install ZenTrainer
First check your ComfyUI version (Settings, About). If it is older than 0.41, update ComfyUI before anything else.
Method 1: ComfyUI Manager (easiest)
- Open ComfyUI Manager and choose Custom Nodes Manager. If you do not have it yet, see my ComfyUI Manager install guide.
- Search for “ZenTrainer” and click Install. The built web app is included.
- Restart ComfyUI fully (close the terminal and start again).
- Click the lotus icon in the top bar, or open
http://127.0.0.1:8188/zentrainer/.
Method 2: Git clone
A git clone also needs the web app built once, which needs Node.js and pnpm.
cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ZenTrainer
cd ZenTrainer/web
pnpm install
pnpm build
Optional extra optimizers install with pip install -r requirements-optional.txt from the ZenTrainer folder, using the same Python as your ComfyUI.
Method 3: Standalone pinned ComfyUI (safest for long runs)
The repo includes a scripts/zt tool. It installs a separate, pinned ComfyUI next to your main one, so updating your main ComfyUI cannot break a training run. It still reads your existing model files.
scripts/zt setup --models-from /path/to/your/ComfyUI/models
scripts/zt start --open
Other commands are dev, restart, doctor, update and attach. Use scripts/zt update rather than deleting the folder to reinstall.
Tip: renting a GPU? The project offers a Docker image and a one-click Runpod template, so you can train a big model without owning a big card.
Prepare Your Dataset
Any folder inside ComfyUI/input/ counts as a dataset. Make one folder per LoRA, for example ComfyUI/input/my_character/.
- Character LoRA: 15-40 clear photos of the same subject, with different angles, outfits, lighting and backgrounds.
- Style LoRA: images that share the style but show different subjects, so the LoRA learns the look, not the content.
- Quality over quantity: remove blurry, tiny, watermarked or duplicate images.
- Masks (optional): save
name-masklabel.pngbeside an image, or paint a mask in the app, to train only on the subject. SAM3 can find the subject for you.
Captions can be written for you by a vision model (Qwen-VL or Gemma) running through ComfyUI. You get long and short caption sets, and you can edit them in a grid, add a prefix or suffix, or find and replace across all of them.
Warning: only train on photos you own or have permission to use. Do not train LoRAs on real people without their consent.
Train Your First LoRA in Simple Mode
- Open ZenTrainer from the lotus icon.
- Pick a preset: Character, Style, Flow-model tweaks or Quick test. Start with Quick test to check your setup.
- Choose the base model. Missing model files download automatically.
- Select your dataset folder and give the LoRA a name and a trigger word.
- Let it caption the images, then skim and fix any wrong captions.
- Start the run and watch the samples and loss curve.
- Stop when samples look right. Do not just wait for the last step; overtrained LoRAs look stiff and copy the training photos.
The form warns you about common mistakes, such as a missing trigger word or an unusual learning rate. Each optimizer comes with a suggested learning rate, so you do not need to guess.
Advanced Mode Options Explained
| Option | What it does | When to use it |
|---|---|---|
| LoRA vs LoKr | Two adapter types | LoRA is the safe default; LoKr can be smaller for the same quality |
| Masked training | Learns only the masked subject | Character LoRAs with busy backgrounds |
| Caption dropout | Sometimes trains with no caption | Helps the trigger word carry the concept |
| Class preservation | Keeps the model’s general idea of the class | Stops “every person looks like my character” |
| AdamW / 8-bit AdamW | Standard optimizer | Good default; 8-bit saves VRAM |
| Prodigy | Finds the learning rate itself | When you do not want to tune LR |
| Lion, CAME, schedule-free | Alternative optimizers | Experiments, or when AdamW plateaus |
Want a deeper dive on one model? My KohakuMoss MOSS-Image LoRA training guide explains rank, steps and learning rate with a 6 GB setup.
Live Controls While It Trains
- Pause, sample or save at any moment.
- Change the learning rate mid-run if the loss stalls or jumps.
- Resume from any saved checkpoint.
- Test your own prompt on any checkpoint before you pick one.
- Validation loss on a fixed set, a better guide than training loss alone.
- Likeness score for character LoRAs.
- Queue runs to train several LoRAs one after another overnight.
Use the Trained LoRA in ComfyUI
Finished LoRAs are saved to ComfyUI/output/zentrainer/loras/, and the project says they show up in your normal LoRA loaders.
- Refresh ComfyUI (press R) so the new file appears.
- Add a LoraLoaderModelOnly (or Load LoRA) node between your model loader and sampler.
- Pick your LoRA and start at strength 0.8.
- Use the trigger word in your prompt.
- Adjust strength: lower it if images look stiff or copied, raise it if the subject does not show.
Run history is kept in ComfyUI/user/zentrainer/, so you can go back to any run later.
ZenTrainer vs Other LoRA Trainers
| ZenTrainer | Separate trainer apps | |
|---|---|---|
| Where it runs | Inside ComfyUI | Their own app or scripts |
| Model files | Reuses your ComfyUI models | Often need their own copies |
| Loads back into ComfyUI | Directly, no conversion | Sometimes needs conversion |
| Live samples and LR changes | Yes | Varies; often samples only at set steps |
| Captioning | Built in (Qwen-VL, Gemma) | Varies |
| Maturity | New (0.4.x) | Usually older and more tested |
If you already have a trainer you trust, keep it for big jobs. ZenTrainer shines for quick character and style LoRAs where you want to see progress as it happens.
Troubleshooting
No lotus icon after install
Fully restart ComfyUI, then hard refresh the browser (Ctrl+F5). If you installed by git clone, make sure you ran pnpm install and pnpm build in the web folder.
“ComfyUI version too old” message
ZenTrainer needs ComfyUI 0.41 or newer. Update ComfyUI, or use the standalone scripts/zt setup route, which installs a pinned version for you.
Out of memory when training starts
Close other GPU apps, pick an 8-bit optimizer, lower resolution or batch size, or choose a smaller base model. My CUDA out of memory guide covers more fixes.
A ComfyUI update broke a run
This is what the pinned standalone install avoids. Use scripts/zt for long or important runs, and scripts/zt doctor to check the setup.
LoRA copies the training photos
It is overtrained. Pick an earlier checkpoint, use more varied images, add caption dropout, or turn on class preservation.
Does it work on Mac?
Not yet. macOS is not supported at the time of writing.
My Take
ZenTrainer fixes the most annoying part of LoRA training: not knowing if a run is working until it ends. Live samples and mid-run LR changes save a lot of wasted hours.
I would start with a Quick test on SDXL or Z-Image to prove the setup, then train a real character LoRA in Simple mode. For long runs on large models, the pinned standalone install is worth the extra step.
FAQ
Is ZenTrainer free?
Yes. It is open source under the MIT licence. Base model licences still apply to what you train.
Which models can ZenTrainer train?
MOSS Image, Krea 2, FLUX 3, FLUX.2 Klein, Qwen-Image 2.1, Z-Image, Anima, Fibo 2.0, SDXL and MiniMax H3, with more listed as untested.
How many images do I need?
Simple mode asks for 15 to 40 photos for a character LoRA. Varied, sharp images matter more than the count.
Where are trained LoRAs saved?
In ComfyUI/output/zentrainer/loras/.
Does ZenTrainer support AMD GPUs?
Yes, it lists AMD (ROCm) support on Linux and Windows alongside NVIDIA.
Can I train MiniMax H3 video LoRAs?
Yes, MiniMax H3 is on the supported list. Video LoRAs need far more VRAM than image ones, so a rented GPU through the Runpod template may be the practical route.
Do I need to convert the LoRA before using it?
No. ZenTrainer trains on ComfyUI’s own model code, so the LoRA loads in normal ComfyUI LoRA nodes.
