Nodes/Mango Node Pack/Diffusion Loader (Mango)
ComfyUI Node

Diffusion Loader (Mango)

Load Flux-style split models, dual CLIP, and LoRAs in one node

By mang01010·Created about a year ago·Updated 4 months ago· 3
Diffusion Loader (Mango)
    • model
    • clip
    • vae
    • lora_stack
    • unet_name
    • unet_hash
    unet_name
    weight_dtype
    clip_name1
    clip_name2
    type
    vae_name
    LoraName1None
    LoraWeight11.00
    LoraName2None
    LoraWeight21.00
    LoraName3None
    LoraWeight31.00
    LoraName4None
    LoraWeight41.00
    LoraName5None
    LoraWeight51.00
    device

    Modern models don't ship as a single checkpoint file. Flux, SD3, and Pony-era SDXL workflows split the "model" into a diffusion UNET plus separate text encoders (often two of them) plus a VAE - which is why the stock loader alone can't handle them. Diffusion Loader (Mango) is the pack's answer: one node that loads a diffusion model, a dual CLIP, a VAE, and up to five LoRAs, and hands you the same metadata-friendly unet_name / unet_hash outputs the rest of the pack expects.

    If you've built a Flux or SDXL graph with the native "UNET Loader + DualCLIPLoader + VAELoader" trio, this node collapses those three into one. It's the modern-architecture sibling of Loader (Mango), and it's the loader you'd reach for on any split-file setup.

    How it works

    The node reads your models/diffusion_models folder for the UNET, models/text_encoders for the two CLIPs, and models/vae for the VAE (it also supports the tiny TAESD/TAEF1 preview VAEs if you have those installed). It loads the diffusion model with comfy.sd.load_diffusion_model, builds a dual CLIP via comfy.sd.load_clip with the CLIP type derived from your type selector, and loads the VAE directly from its state dict. LoRAs apply on top, same load_lora_for_models machinery as the rest of the pack. It computes a 10-character SHA-256 prefix of the UNET file, so unet_hash is honest metadata material.

    Inputs and outputs that matter

    • unet_name - dropdown of your diffusion_models. The core choice.
    • type - sdxl, sd3, flux, or hunyuan_video. This sets the CLIP type, so get it right or your conditioning will be wrong in confusing ways.
    • clip_name1 / clip_name2 - the two text encoders from models/text_encoders.
    • vae_name - from models/vae, plus the taesd/taef1 options if present.
    • weight_dtype - default, or fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2. The fp8 options quantize the diffusion model on load, which is how you fit big Flux files into tight VRAM. If you're on a 24 GB card you probably don't need them; if you're on 8 GB, they might be the difference between running and not.
    • LoraName1…5 / LoraWeight1…5 - the usual five LoRA slots.
    • device (optional) - default or cpu. "CPU" here forces the CLIP onto CPU, useful for giant text encoders when VRAM is short, at the cost of slower prompt encoding.

    Outputs: model / clip / vae go to your sampler and decoder; lora_stack feeds the sampler for metadata; unet_name / unet_hash (STRINGS) feed the text fields on FluxSampler (Mango) so your saved images record which UNET you used and its hash.

    Installing it

    It's part of the Mango Node Pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mang01010/MangoNodePack
    

    Restart ComfyUI, or install "Mango Node Pack" via ComfyUI Manager. No extra model downloads beyond what you already have in models/diffusion_models, models/text_encoders, and models/vae - and note those folders may be empty in a fresh install, so point them at whatever model files you're already using.

    Gotchas

    The type selector is the trap. Pick flux when you're actually running a Pony SDXL model and your generations will be subtly broken in ways that are hard to debug. Also, fp8 weight dtypes trade a little quality for VRAM headroom - Q8-style quantization is "basically fp16 at half the size" territory, but the e5m2 variant is visibly rougher, so don't default to it unless you must. One more: because it loads the UNET from diffusion_models, your split-model files need to be in that folder - a checkpoint-style file in models/checkpoints won't show up in the dropdown. It's a small node that assumes you've already organized your models the modern way, and it's the right tool when you have.

    CategoryMango Node Pack/Loaders

    Inputs (17)

    NameTypeDefaultDescription
    unet_nameCOMBO0 options:
    weight_dtypeCOMBO4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2
    clip_name1COMBO0 options:
    clip_name2COMBO0 options:
    typeCOMBO4 options: sdxl, sd3, flux, hunyuan_video
    vae_nameCOMBO0 options:
    LoraName1COMBONone1 options: None
    LoraWeight1FLOAT1.00-10–10
    LoraName2COMBONone1 options: None
    LoraWeight2FLOAT1.00-10–10
    LoraName3COMBONone1 options: None
    LoraWeight3FLOAT1.00-10–10
    LoraName4COMBONone1 options: None
    LoraWeight4FLOAT1.00-10–10
    LoraName5COMBONone1 options: None
    LoraWeight5FLOAT1.00-10–10
    deviceoptCOMBO2 options: default, cpu

    Outputs (6)

    NameTypeDescription
    modelMODEL
    clipCLIP
    vaeVAE
    lora_stackLORA_STACK
    unet_nameSTRING
    unet_hashSTRING