Nodes/comfy-multigpu-loader/Flux Loader (All-In-One)
ComfyUI Node

Flux Loader (All-In-One)

The all-in-one Flux loader that stops the three-file circus

By AngelCookiesLab·Created 9 months ago·Updated 9 months ago· 2
Flux Loader (All-In-One)
    • model
    • clip
    • vae
    ckpt_nametest_mode
    num_gpus2
    gpu_ids0,1,2,3
    clip_name1<auto>
    clip_name2<auto>
    clip_loader_typeflux
    vae_name<auto>
    safety_oktrue

    Flux is the reason anyone picks up this pack, and it's the pack's own headliner: the author's verified test case is Flux Dev Full Model in fp32 (~22GB) sharded across 4×RTX 3070s. Flux Loader (All-In-One) is the loader that makes that a one-node affair instead of the usual three-node dance of separate UNet, text-encoder, and VAE loading.

    "All-in-one" here means it bundles the pieces the way ComfyUI's stock Flux checkpoint loader does, then adds the multi-GPU sharding on top. It's a subclass of the SD loader with Flux defaults pre-set: clip_loader_type is locked to flux, the dual text encoders are auto-detected, and the VAE is auto-picked.

    How it works

    Same mechanism as Load Checkpoint (MultiGPU), but the diffusion module it finds and shards is the Flux transformer - double_blocks and single_blocks instead of input_blocks/output_blocks. The surround modules (img_in, time_in, txt_in, final_layer, guidance, the pe embedder) stay on the primary GPU; the block stacks get spread across your cards with a custom forward migrating activations between devices at runtime. No NVLink needed - plain PCIe.

    One notable default: this loader's CLIP runs on CPU (clip_default_device = "cpu"). That's deliberate - it keeps the T5 text encoder from eating VRAM that the sharded UNet needs, at the cost of slower prompt encoding. You can flip it per-load if you'd rather trade the other way.

    Model files you need

    The README's USER_GUIDE is specific:

    • Flux checkpoint in models/checkpoints/ (select it via ckpt_name).
    • clip_l.safetensors and t5xxl_fp8_e4m3fn_scaled.safetensors in models/text_encoders/ - the loader auto-picks clip_l and t5 files as defaults.
    • ae.safetensors in models/vae/ - auto-detected by filename.

    If any external piece is missing, the loader raises and tells you what to supply - it won't silently half-load.

    Inputs that matter

    ckpt_name, num_gpus (1–4 or Auto), gpu_ids (execution order, default 0,1,2,3), clip_name1/clip_name2, clip_loader_type (fixed to flux), vae_name, and safety_ok (the Hardware Validator gate - loading aborts when false). Outputs: model, clip, vae - standard sockets for a normal downstream graph.

    Installing it

    ComfyUI Manager search "Comfy-MultiGPU-Loader", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AngelCookiesLab/Comfy-MultiGPU-Loader
    pip install -r requirements.txt   # accelerate only
    

    Restart, find it under MultiGPU/Loaders.

    The honest part

    The README calls the Flux loaders "early/less tested" and points you to the debug variant for diagnostics. The verified win is Flux Dev Full fp32 (~22GB) on multi-GPU; the planned Flux Dev 2 (~60GB) is still "needs verifying." And the usual project caveats apply - sunset, GPL-3.0, as-is, no support. If you're on a single card, ComfyUI-GGUF is the mature path; this is for when you have multiple cards and want to keep full-precision weights spread across them. It's an experiment with one confirmed data point, but that data point is the exact scenario this pack promises.

    CategoryMultiGPU/Loaders

    Inputs (8)

    NameTypeDefaultDescription
    ckpt_nameCOMBOtest_modeCheckpoint to load from ComfyUI models/checkpoints.
    num_gpusCOMBO2How many GPUs to allocate (use Auto for all available).
    gpu_idsoptSTRING0,1,2,3Comma separated GPU indices in execution order.
    clip_name1optCOMBO<auto>Primary text encoder file (leave <auto> to use checkpoint embedded CLIP).
    clip_name2optCOMBO<auto>Secondary/paired text encoder file.
    clip_loader_typeoptCOMBOflux1 options: flux
    vae_nameoptCOMBO<auto>External VAE to use when checkpoint does not bundle one.
    safety_okoptBOOLEANtrueConnect to Hardware Validator; loading aborts when false.

    Outputs (3)

    NameTypeDescription
    modelMODEL
    clipCLIP
    vaeVAE