MinusZone - KohyaSSTrain(lora)
The one MinusZone train node you should actually use now
- workspace_config
- advanced_config
- caption_completed_flag
This is the node to use. MZ_KohyaSSLoraTrain (display name "KohyaSSTrain(lora)") is the pack's current, merged LoRA training node: it takes the workspace, the template choice, the base checkpoint, and the training basics all in one place, then runs the kohya training the way the old two-step chain (MZ_KohyaSSUseConfig → MZ_KohyaSSTrain) did. If you're starting a MinusZone workflow from scratch today, this is the one the graph is built around.
The workflow shape is: MZ_KohyaSSInitWorkspace → MZ_KohyaSSDatasetConfig → this node, with MZ_KohyaSSAdvConfig optionally feeding advanced_config. Everything that matters for the run lives on these three.
How it works
Like the old trainer, it builds a full sd-scripts config from a template JSON in the pack's configs/kohya_ss_lora/ folder (lora_sd1_5, lora_sdxl, lora_hunyuan1_1, lora_hunyuan1_2, controlnet_sd1_5), then runs training in-process. The difference from the old chain: the template, checkpoint, steps, and learning rate are all set right here on the node, and the optional advanced_config from MZ_KohyaSSAdvConfig overrides template defaults. No separate config-builder step.
It also carries the resume trick from the old trainer: base_lora defaults to latest, which means "continue from the newest .safetensors in this workspace's output folder." Combined with save_every_n_epochs, that's your stop-and-resume story - crash, fix the env, re-queue, pick up where the last save was.
The inputs you'll actually set
train_config_template- your model family. This matters more than anything else on the node. lora_sd1_5 for SD 1.5, lora_sdxl for SDXL, the hunyuan ones for Hunyuan DiT via this path.ckpt_name- the base checkpoint from your ComfyUI checkpoints folder.max_train_epochs(default 100) /save_every_n_epochs(default 10) - train-to-save cadence. Dropsave_every_n_epochsto 2–3 so you have checkpoints to pick from; the last epoch is rarely the best.learning_rate- a string like"1e-5"(sd-scripts convention). Don't type0.00001and wonder why it's treated as text - it still works, but kohya parses it as a string either way.base_lora-latestto resume,emptyto start clean, or any scanned LoRA.sample_generate+sample_prompt- renders a sample at each save and shows it in the UI. Keep it on; it's your early-warning system for overfitting.advanced_config(optional) - from MZ_KohyaSSAdvConfig.caption_completed_flag(optional) is an ordering signal - wire the output of a captioning node here to force sequencing.
Install & troubleshooting
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
# restart ComfyUI
Or Manager → search ComfyUI-TrainTools-MZ.
First-run gotchas: the pack clones sd-scripts at a pinned commit on the InitWorkspace step (not here), and the first train triggers auto-pip of helper deps. If you chose an 8-bit optimizer upstream, install bitsandbytes yourself or the run dies at startup. And the dataset gotcha is upstream too - this node reads workspace_images_dir from the dataset step, and if that string never got wired, training starts against an empty dataset. The base_lora = latest behavior also means a fresh run over an old workspace silently continues the old LoRA - use empty (or a new lora_name) when you want a clean slate.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| workspace_config | MZ_TT_SS_WorkspaceConfig | — | |
| train_config_template | COMBO | 5 options: lora_hunyuan1_1, lora_hunyuan1_2, lora_sdxl, lora_sd1_5, controlnet_sd1_5 | |
| ckpt_name | COMBO | 0 options: | |
| max_train_steps | INT | 00–2147483647 | — |
| max_train_epochs | INT | 1000–2147483647 | — |
| save_every_n_epochs | INT | 10 | — |
| learning_rate | STRING | 1e-5 | — |
| base_lora | COMBO | latest | 2 options: latest, empty |
| sample_generate | COMBO | enable | 2 options: enable, disable |
| sample_prompt | STRING | — | |
| advanced_configopt | MZ_TT_SS_AdvConfig | — | |
| caption_completed_flagopt | * | — |
Outputs (0)
No outputs