Nodes/ComfyUI_FL-Trainer/FL Kohya Adv Config
ComfyUI Node

FL Kohya Adv Config

Every Kohya knob, none of the command line

By filliptm·Created 2 years ago·Updated 4 months ago· 178
FL Kohya Adv Config
    • advanced_config
    â—„xformersenableâ–ş
    â—„sdpadisableâ–ş
    â—„fp8_basedisableâ–ş
    â—„mixed_precisionfp16â–ş
    â—„gradient_accumulation_steps1â–ş
    â—„gradient_checkpointingdisableâ–ş
    â—„cache_latentsenableâ–ş
    â—„cache_latents_to_diskenableâ–ş
    â—„network_dim16â–ş
    â—„network_alpha8â–ş
    â—„network_modulenetworks.loraâ–ş
    â—„network_train_unet_onlyenableâ–ş
    â—„lr_schedulercosineâ–ş
    â—„lr_scheduler_num_cycles1â–ş
    â—„optimizer_typeAdamWâ–ş
    â—„lr_warmup_steps0â–ş
    â—„unet_lrâ–ş
    â—„text_encoder_lrâ–ş
    â—„shuffle_captiondisableâ–ş
    â—„save_precisionfp16â–ş
    â—„persistent_data_loader_workersenableâ–ş
    â—„no_metadataenableâ–ş
    â—„noise_offset0.10â–ş
    â—„no_half_vaeenableâ–ş
    â—„lowramdisableâ–ş

    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), plus networks.dylora and networks.oft for 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 AdamW up through AdamW8bit, PagedAdamW, Lion, the DAdapt* family and beyond. AdamW8bit is the safe pick; Adafactor trades 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_only on, rank 16/8, fp16. Fine for both, but check resolution upstream 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.

    Category🏵️Fill Nodes/Training

    Inputs (25)

    NameTypeDefaultDescription
    xformersCOMBOenable2 options: enable, disable
    sdpaCOMBOdisable2 options: enable, disable
    fp8_baseCOMBOdisable2 options: enable, disable
    mixed_precisionCOMBOfp163 options: no, fp16, bf16
    gradient_accumulation_stepsINT1—
    gradient_checkpointingCOMBOdisable2 options: enable, disable
    cache_latentsCOMBOenable2 options: enable, disable
    cache_latents_to_diskCOMBOenable2 options: enable, disable
    network_dimINT16—
    network_alphaINT8—
    network_moduleCOMBOnetworks.lora3 options: networks.lora, networks.dylora, networks.oft
    network_train_unet_onlyCOMBOenable2 options: enable, disable
    lr_schedulerCOMBOcosine7 options: linear, cosine, cosine_with_restarts, polynomial, constant, constant_with_warmup, +1
    lr_scheduler_num_cyclesINT1—
    optimizer_typeCOMBOAdamW18 options: AdamW, AdamW8bit, PagedAdamW, PagedAdamW8bit, PagedAdamW32bit, Lion8bit, +12
    lr_warmup_stepsINT0—
    unet_lrSTRING—
    text_encoder_lrSTRING—
    shuffle_captionCOMBOdisable2 options: enable, disable
    save_precisionCOMBOfp163 options: float, fp16, bf16
    persistent_data_loader_workersCOMBOenable2 options: enable, disable
    no_metadataCOMBOenable2 options: enable, disable
    noise_offsetFLOAT0.10—
    no_half_vaeCOMBOenable2 options: enable, disable
    lowramCOMBOdisable2 options: enable, disable

    Outputs (1)

    NameTypeDescription
    advanced_configFL_TT_SS_AdvConfig—