ComfyUI Node

Model Loader

The anti-spaghetti way to load a UNet

By r-vage·Created 29 days ago·Updated 3 days ago· 2
Model Loader
    • model
    • clip
    • vae
    • audio_vae
    • model_name
    featuresmemory_cleanup
    model_typeStandard Checkpoint
    ckpt_nameNone
    unet_nameNone
    nunchaku_nameNone
    qwen_nameNone
    zimage_nameNone
    gguf_nameNone
    weight_dtypedefault
    data_typebfloat16
    cache_threshold0.000
    attentionflash-attention2
    i2f_modeenabled
    cpu_offloadauto
    num_blocks_on_gpu30
    use_pin_memoryenable
    gguf_dequant_dtypedefault
    gguf_patch_dtypedefault
    gguf_patch_on_devicefalse
    enable_clip_layertrue
    stop_at_clip_layer-2
    lora_count1
    lora_switch_1false
    lora_name_1None
    lora_weight_11.00
    lora_switch_2false
    lora_name_2None
    lora_weight_21.00
    lora_switch_3false
    lora_name_3None
    lora_weight_31.00
    sampling_methodNone
    sampling_subtypeeps
    shift3.00
    base_shift0.50
    sampling_width1024
    sampling_height1024
    original_timesteps50
    zsnrfalse
    sigma_max120.000
    sigma_min0.002
    blocks_to_swap5
    offload_embeddingsfalse
    ltx_text_encoderNone

    Not everyone wants the all-in-one. If the Smart Model Loader feels like a Swiss Army knife you don't need to carry, Model Loader [Eclipse] is the plain screwdriver: the same model-loading engine from the same pack, but it hands you raw sockets instead of one bundled PIPE. You get model, clip, vae, audio_vae, and model_name straight out, ready to wire into a normal KSampler, CLIP Text Encode, and VAE Decode like you've always done.

    It shines for UNet-only and quantized setups. Flux, SD3, and AuraFlow are usually distributed as standalone diffusion models with no baked CLIP or VAE - so you need a loader that handles that file type directly, then pair it with the pack's CLIP Loader and VAE Loader. For a stock checkpoint with everything baked in, either loader works; the standalone version just keeps the rest of your graph conventional.

    The inputs that matter

    There are a lot of them, but you'll touch a handful. model_type switches the whole personality of the node - Standard Checkpoint, UNet, Nunchaku (Flux/Qwen/ZImage), or GGUF - and the relevant name field lights up: ckpt_name, unet_name, nunchaku_name, qwen_name, zimage_name, or gguf_name. Then:

    • LoRA slots - lora_count (1–3), each with lora_switch_N, lora_name_N, lora_weight_N. Model-only patching, no separate CLIP weight.
    • sampling_method - pick the architecture and the loader applies the correct scheduler shift for you: SD3 shift 3.0, AuraFlow 1.73, Flux max_shift 1.15, Stable Cascade 2.0, LCM distilled, LTXV for video. Leave on None for a standard model and forget it.
    • blocks_to_swap - GPU→CPU transformer offload. The tooltip even gives suggested counts per architecture (Flux ~10 of 57, SD3 ~8 of 24, Wan ~10 of 40). Set to 0 to disable. offload_embeddings grabs another ~100–300MB.
    • ltx_text_encoder - the special one. For LTX2/LTXV, point it at a Gemma text encoder (GGUF or safetensors) and it combines it with the model file's baked text projection to build a correct LTXAV CLIP.

    Outputs

    • model → KSampler
    • clip → CLIP Text Encode (None for UNet/Nunchaku/GGUF - add the CLIP Loader)
    • vae → VAE Decode (None for those same types - add the VAE Loader)
    • audio_vae → LTXV/LTX2 audio decode
    • model_name → handy for filenames or metadata

    Installing

    Same story as the whole pack - Manager, search ComfyUI Smart Model Loader, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI_SmartModelLoader.git
    cd ComfyUI_SmartModelLoader
    python -m pip install -r requirements.txt
    

    Restart ComfyUI. Nunchaku and GGUF types need ComfyUI-Nunchaku and ComfyUI-GGUF in custom_nodes; without them the quantized options are just disabled and standard checkpoints still load.

    Common issues

    • clip comes out None on a UNet - that's expected, not a bug. The model file genuinely has no text encoder. Pair with CLIP Loader and set clip_type to match (Flux wants 2 CLIP modules).
    • VRAM OOM - go GGUF or Nunchaku, or raise blocks_to_swap before you buy a new card.
    • Weird sampler behavior on Flux - set sampling_method to Flux so the shift is computed for your resolution instead of using a generic default.
    Category🌒 Smart Model Loader/ Loader

    Inputs (44)

    NameTypeDefaultDescription
    featuresSTRINGmemory_cleanupComma-separated feature list. JS combo-chip replaces this widget.
    model_typeCOMBOStandard CheckpointSelect model format
    ckpt_nameCOMBONoneSelect checkpoint file
    unet_nameCOMBONoneSelect UNet diffusion model
    nunchaku_nameCOMBONoneSelect Nunchaku Flux model
    qwen_nameCOMBONoneSelect Nunchaku Qwen model
    zimage_nameCOMBONoneSelect Nunchaku ZImage model
    gguf_nameCOMBONoneSelect GGUF model
    weight_dtypeCOMBOdefaultWeight dtype for UNet model
    data_typeCOMBObfloat16Model data type for Nunchaku
    cache_thresholdFLOAT0.0000–1Cache threshold for Nunchaku
    attentionCOMBOflash-attention2Attention implementation
    i2f_modeCOMBOenabledGEMM implementation
    cpu_offloadCOMBOautoCPU offload
    num_blocks_on_gpuINT301–60Blocks on GPU (Nunchaku Qwen/ZImage)
    use_pin_memoryCOMBOenableUse pinned memory
    gguf_dequant_dtypeCOMBOdefaultDequantization dtype
    gguf_patch_dtypeCOMBOdefaultLoRA patch dtype
    gguf_patch_on_deviceBOOLEANfalseApply patches on GPU
    enable_clip_layerBOOLEANtrueTrim baked CLIP to specific layer (Standard Checkpoint only)
    stop_at_clip_layerINT-2-24–-1CLIP layer to stop at
    lora_countCOMBO1Number of LoRA slots
    lora_switch_1BOOLEANfalseEnable LoRA 1
    lora_name_1COMBONoneLoRA 1 file
    lora_weight_1FLOAT1.00-10–10LoRA 1 model weight
    lora_switch_2BOOLEANfalseEnable LoRA 2
    lora_name_2COMBONoneLoRA 2 file
    lora_weight_2FLOAT1.00-10–10LoRA 2 model weight
    lora_switch_3BOOLEANfalseEnable LoRA 3
    lora_name_3COMBONoneLoRA 3 file
    lora_weight_3FLOAT1.00-10–10LoRA 3 model weight
    sampling_methodCOMBONoneSampling method: SD3 (shift=3.0), AuraFlow (shift=1.73), Flux (max_shift=1.15), Stable Cascade (shift=2.0), LCM (distilled), ContinuousEDM/V (continuous sampling), LTXV (video)
    sampling_subtypeCOMBOepsSubtype for ContinuousEDM sampling
    shiftFLOAT3.000–100Universal shift parameter (SD3: 3.0, AuraFlow: 1.73, Flux max_shift: 1.15, Stable Cascade: 2.0)
    base_shiftFLOAT0.500–100Base shift for Flux/LTXV sampling (default: 0.5)
    sampling_widthINT102416–32768Width for Flux sampling shift calculation
    sampling_heightINT102416–32768Height for Flux sampling shift calculation
    original_timestepsINT501–1000Original timesteps for LCM sampling (default: 50)
    zsnrBOOLEANfalseEnable zero-terminal SNR for LCM sampling
    sigma_maxFLOAT120.0000–1000Maximum sigma for ContinuousEDM/V sampling (EDM: 120.0, V: 500.0)
    sigma_minFLOAT0.0020–1000Minimum sigma for ContinuousEDM/V sampling (EDM: 0.002, V: 0.03)
    blocks_to_swapINT50–100Number of transformer blocks to offload from GPU to CPU. Higher = more VRAM saved but slower inference. Suggested ~value (max total blocks): flux/chroma ~10 (max 57), sd3 ~8 (max 24-38), wan ~10 (max 30-40), hunyuan-video ~10 (max 60), ltxv ~6 (max 28), cosmos ~8 (max 28-36), zimage ~10 (max 30), qwenimage ~20 (max 60), mochi ~10 (max 48), hidream ~10 (max 48). Set to 0 to disable.
    offload_embeddingsBOOLEANfalseAlso offload embedding and projection layers for extra VRAM savings.
    ltx_text_encoderCOMBONoneOptional LTX2/LTXV gemma text encoder (from the text_encoders/clip folder, GGUF or safetensors). When set, it is combined with the loaded Standard Checkpoint / UNet file's baked text-projection to build a correct LTXAV CLIP, overriding the (empty) baked CLIP. Leave as None for normal baked-CLIP behavior.

    Outputs (5)

    NameTypeDescription
    modelMODEL
    clipCLIP
    vaeVAE
    audio_vaeVAE
    model_nameSTRING