FL Kohya Adv Config
Every Kohya knob, none of the command line
- advanced_config
If FL Kohya Easy Train is the "I just want it to work" path, FL Kohya Adv Config is the "I know exactly what I want" path. It's a form over every training flag Kohya's sd-scripts accepts, and it's where the FL-Trainer manual chain gets its personality. You set your values here, the node hands a config object to FL Kohya Train, and your choices get merged into the training run.
It only exists because of what Kohya is: a CLI with dozens of flags and a config convention the whole ecosystem copied. This node is a GUI for that vocabulary - network_dim, network_alpha, lr_scheduler, optimizer_type. If you can read a Kohya config dump, you already know this node; if you can't, this is a friendlier way to learn the words.
How it works
The node doesn't train anything itself. It collects your settings and emits an advanced_config object. When FL Kohya Train runs, each value is layered over the base config template: enable/disable become booleans, numbers become strings, and - the useful trick - an empty string means "leave the template's value alone." So unet_lr left blank simply inherits your main learning rate, and you only override the things you actually care about.
Inputs that matter
- network_dim / network_alpha - rank and scaling, the two numbers every Kohya guide obsesses over. Defaults are 16/8, the classic "alpha at half rank" convention. Rank 32 with alpha 16 is the SDXL character-work sweet spot if you want more capacity.
- network_module -
networks.lora(default), plusnetworks.dyloraandnetworks.oftfor the exotic variants. - network_train_unet_only - on by default, meaning the text encoder is left frozen. For SDXL that's a big VRAM saver and most people never flip it; leave it on.
- optimizer_type - 18 choices from plain
AdamWup throughAdamW8bit,PagedAdamW,Lion, theDAdapt*family and beyond.AdamW8bitis the safe pick;Adafactortrades quality for lower VRAM. - lr_scheduler - cosine (default), cosine_with_restarts, constant, polynomial, and friends. The EasyTrain node quietly uses constant; you get to choose.
- unet_lr / text_encoder_lr - separate LRs for the two halves. Empty inherits; setting just one is a common trick to let the U-Net learn while the encoder coasts.
- shuffle_caption - shuffles your tags each epoch, a real quality boost for tag-style datasets.
- cache_latents + cache_latents_to_disk - precompute latents once and reuse across epochs. Both default on; this is the single biggest speed lever for multi-epoch runs.
- gradient_checkpointing, gradient_accumulation_steps, mixed_precision, xformers/sdpa, fp8_base, noise_offset, save_precision, lr_warmup_steps - the VRAM-and-precision dials. You'll grow into these.
The output is advanced_config, which feeds directly into FL Kohya Train's advanced_config input.
Install
Same as the whole pack - Manager search "FL-Trainer", or git clone https://github.com/filliptm/ComfyUI_FL-Trainer into custom_nodes and restart.
Gotchas
- Defaults match the SD 1.5 template, not SDXL. The node ships
network_train_unet_onlyon, rank 16/8, fp16. Fine for both, but checkresolutionupstream and your VRAM before blaming a bad run on settings. - Empty-string fields are "unset," so you can't force an explicit empty value into a flag - a mild trap if you're porting a config that genuinely passes an empty string.
- The manual chain is SD 1.5/SDXL only (pinned sd-scripts), same as the rest of this pack.
- If you just want a working LoRA, you don't need this node at all - EasyTrain sets all of this for you. Reach for Adv Config when EasyTrain's hidden choices aren't good enough and you know why.
The one caveat: a bad dataset beats perfect settings every time. But for the second run, when you're chasing a real result, this is where the power is.
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 | FL_TT_SS_AdvConfig | — |