MinusZone - KohyaSSAdvConfig
Every Kohya tuning knob, dumped into one node (network_dim and friends)
- advanced_config
If MZ_KohyaSSInitWorkspace is the pack's front door, MZ_KohyaSSAdvConfig is the control panel with the confusingly many switches. It's a single node that collects the sd-scripts training flags you'd normally sprinkle through a kohya config file, and hands them forward as one advanced_config object. You don't need to touch most of them - the pack's templates already have sane defaults - but when you outgrow the template, this is where you grow.
Everything here maps 1:1 to a kohya flag, which is the same vocabulary the KB's LoRA training doc spends pages on. That's both the strength and the danger: the node exposes the raw knobs with no presets, and the kohya-ss panel's verdict is that this is exactly why beginners bounce off. Start with the template, tweak from there.
The inputs that actually matter
network_dim/network_alpha(defaults 16 / 8) - the rank and the alpha. The alpha-at-half-rank convention (alpha ≈ dim/2) is Kohya's house style, and it's what "rank 16, alpha 8" means when you read a config dump. Raisenetwork_dimwhen a small rank underfits a style, not when your character looks off.network_module-networks.lora(default),networks.dylora(dynamic, more expressive, fiddlier), ornetworks.oft. Stay on lora for your first few runs.mixed_precision-fp16default,bf16on cards that support it,noif you have VRAM to burn and want to fight for precision.cache_latents+cache_latents_to_disk(both default enable) - precompute the latents once instead of every epoch. The single biggest speed lever in a modern config; leave both on.optimizer_type- AdamW default, with the whole 8-bit / Paged / Lion / DAdapt family in the dropdown. The KB notes 8-bit optimizers are where installs usually break: AdamW8bit needsbitsandbytes, which is the most dependency-prone package in the kohya stack. If you pick one and training dies at startup with a bnb error, that's why.lr_scheduler/lr_warmup_steps- cosine with a small warmup is the boring, correct choice.network_train_unet_only(default enable) - train only the UNet, not the text encoder. Common on SD-family LoRAs, and it saves memory.noise_offset(0.1) - a small value helps contrast; the "0.1" everyone copies.xformers/sdpa- the attention backends. Enable one, not both;sdpais the modern default,xformersis the legacy fallback.
How it works & what it outputs
The node just packages the dict - the actual training flags get merged into the final config when MZ_KohyaSSTrain or MZ_KohyaSSLoraTrain runs. Output is advanced_config (type MZ_TT_SS_AdvConfig). In the old chain you wire it into MZ_KohyaSSUseConfig's save_advanced_config; in the new chain straight into MZ_KohyaSSLoraTrain. Either way, values here override the template.
Install & troubleshooting
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
# restart ComfyUI
Or ComfyUI Manager → ComfyUI-TrainTools-MZ. No extra deps for the node itself.
Where people get burned: flipping xformers and sdpa both on (some environments tolerate it, some don't), picking a save_precision of float and wondering why the output is twice the size, and choosing an 8-bit optimizer without bitsandbytes installed. And the eternal one - a higher network_dim is not free quality. If you're tuning because results are bad, change one thing at a time, and remember the KB's blunt line: dataset curation beats every knob.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| xformers | COMBO | enable | 2 options: enable, disable |
| sdpa | COMBO | disable | 2 options: enable, disable |
| fp8_base | COMBO | disable | 2 options: enable, disable |
| mixed_precision | COMBO | fp16 | 3 options: no, fp16, bf16 |
| gradient_accumulation_steps | INT | 1 | — |
| gradient_checkpointing | COMBO | disable | 2 options: enable, disable |
| cache_latents | COMBO | enable | 2 options: enable, disable |
| cache_latents_to_disk | COMBO | enable | 2 options: enable, disable |
| network_dim | INT | 16 | — |
| network_alpha | INT | 8 | — |
| network_module | COMBO | networks.lora | 3 options: networks.lora, networks.dylora, networks.oft |
| network_train_unet_only | COMBO | enable | 2 options: enable, disable |
| lr_scheduler | COMBO | cosine | 7 options: linear, cosine, cosine_with_restarts, polynomial, constant, constant_with_warmup, +1 |
| lr_scheduler_num_cycles | INT | 1 | — |
| optimizer_type | COMBO | AdamW | 18 options: AdamW, AdamW8bit, PagedAdamW, PagedAdamW8bit, PagedAdamW32bit, Lion8bit, +12 |
| lr_warmup_steps | INT | 0 | — |
| unet_lr | STRING | — | |
| text_encoder_lr | STRING | — | |
| shuffle_caption | COMBO | disable | 2 options: enable, disable |
| save_precision | COMBO | fp16 | 3 options: float, fp16, bf16 |
| persistent_data_loader_workers | COMBO | enable | 2 options: enable, disable |
| no_metadata | COMBO | enable | 2 options: enable, disable |
| noise_offset | FLOAT | 0.10 | — |
| no_half_vae | COMBO | enable | 2 options: enable, disable |
| lowram | COMBO | disable | 2 options: enable, disable |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| advanced_config | MZ_TT_SS_AdvConfig | — |