Nodes/Diffusion_pipe_in_ComfyUI/Flux模型配置器
ComfyUI Node

Flux模型配置器

The original FLUX.1 config node — diffusers folder, single file, or a FLEX quirk

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
Flux模型配置器
    • model_path
    diffusers_path
    transformer_path
    bypass_guidance_embeddingfalse
    flux_shiftfalse

    Flux is the model that made BFL the name in local generation, and it's still one of the most-trained-on architectures around. FluxModelNode is the pack's original Flux config node - the one that takes your FLUX.1 files and hands a training-ready config to GeneralConfig. If you already have a FLUX.1-dev or -schnell setup, this node is the most straightforward model config in the pack.

    What it does

    Unlike most model nodes here, everything is optional - the node will happily emit a bare type: "flux" config. The inputs give you three ways to express where the model lives, plus two behavioral toggles:

    • diffusers_path (optional) - a full path to a Flux diffusers folder. This is the "I have the standard HuggingFace-style folder" route.
    • transformer_path (optional) - the transformer as a standalone single file, e.g. consolidated_s6700-schnell.safetensors. The tooltip describes it as the file you point at "when using a separate transformer file." You'd fill this if your weights are ComfyUI-style single files rather than a diffusers folder.
    • bypass_guidance_embedding (default off) - and here's a genuinely obscure flag. The tooltip says it's for FLEX.1-alpha: bypassing the guidance embedding for that model. Unless you know you're training on FLEX.1-alpha, leave it off. It's the kind of field that exists because one specific community model needed it.
    • flux_shift (default off) - the resolution-dependent timestep shift. Interesting detail: it's off by default here, whereas the Chroma and Kontext nodes ship it on. That asymmetry is worth respecting - don't flip it on just because another node defaults it differently.

    Because nothing is required, an empty node is a silent no-op: it produces {type: flux} and lets the trainer fall back to whatever diffusion-pipe's own defaults resolve. That's convenient but also a trap - you can think you configured Flux and actually be training on defaults.

    Fitting it in

    FluxModelNodeGeneralConfig.model_configTrain, with the usual adapter/dataset/optimizer ring. The README table is the classic Flux story: LoRA ✅, full fine-tune ✅, fp8 ✅. The KB's training notes apply in full here - Flux was the model that ended the SDXL rank/alpha tables, so start at rank 16, natural-language captions, and a learning rate far lower than you'd use on SDXL.

    Installing the pack

    The shared install - Linux/WSL2 only, submodules required:

    cd ComfyUI/custom_nodes/
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    git submodule update
    pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
    

    Restart and import the example workflow - it shows the canonical Flux wiring with the other config nodes.

    Common issues

    The classic mistake is leaving this node empty and assuming "Flux is default" means it worked - check the console for what actually got emitted. Path errors are next: full absolute paths only, and remember the pack-wide WSL2 convention of Windows drive-letter paths (Z:/... rather than /mnt/z/...). And don't tick bypass_guidance_embedding for anything but FLEX.1-alpha - it exists for that one model, and it will quietly change behavior on everything else.

    CategoryDiffusion-Pipe/Model

    Inputs (4)

    NameTypeDefaultDescription
    diffusers_pathoptSTRINGFlux diffusers模型文件夹的完整路径
    transformer_pathoptSTRINGtransformer文件的完整路径(当启用单独的transformer文件时需要如/data2/imagegen_models/flux-dev-single-files/consolidated_s6700-schnell.safetensors)
    bypass_guidance_embeddingoptBOOLEANfalse绕过guidance embedding(FLEX.1-alpha启用)
    flux_shiftoptBOOLEANfalse启用flux_shift

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path