Nodes/ComfyUI AutoMultiGPU Engine/Auto DualCLIP Loader (MultiGPU - Safetensors & GGUF)
ComfyUI Node

Auto DualCLIP Loader (MultiGPU - Safetensors & GGUF)

The Auto DualCLIP Loader

By nexusfinancial-dev·Created 24 days ago·Updated 24 days ago· 6
Auto DualCLIP Loader (MultiGPU - Safetensors & GGUF)
    • CLIP
    clip_name1
    clip_name2
    typeauto
    target_deviceAuto (Secondary GPU - cuda:1)
    cpu_offloadauto_smart_offload

    Some architectures need two text encoders, and SDXL is only the famous one. FLUX pairs its big T5-XXL with a smaller CLIP-L, Wan and Hunyuan stack an encoder on top of another, and every one of them multiplies the VRAM pressure on your main card. AutoDualCLIPLoaderMultiGPU is the two-file version of the pack's single CLIP loader: it takes two text encoders - .safetensors or .gguf, mixed formats allowed - and loads both onto your secondary GPU so neither competes with the sampler.

    If you've got the second card idle, this is the node that makes it earn its slot. Loading T5-XXL (roughly 10GB fp16) plus a second encoder onto the spare GPU is often exactly what turns a borderline FLUX workflow from OOM into repeatable.

    How it works

    Same machinery as AutoCLIPLoaderMultiGPU, doubled. It resolves both files across the text_encoders / clip / clip_gguf folders, determines the right ComfyUI CLIPType from the 37-option type picker (default auto, which guesses from filenames), and passes both files to ComfyUI's load_clip() with explicit load_device targeting your chosen card. If either file is GGUF it switches to the ComfyUI-GGUF loader path and patches the patcher's load device accordingly.

    One detail that matters: the order of the two files can matter for some architectures, so keep the convention your model's docs use (for SDXL that's CLIP-L first, CLIP-G second).

    The inputs that matter

    • clip_name1 / clip_name2 - the two encoder files. Both formats appear in one list, so you can mix a safetensors encoder with a GGUF one.
    • type - architecture picker; auto is usually right.
    • target_device - "Auto (Secondary GPU - cuda:1)" by default; picks cuda:1, then cuda:0, then CPU as fallbacks.
    • cpu_offload - auto_smart_offload (default), always_offload_to_cpu, or disabled_vram_only.

    Output is a single combined CLIP that feeds a DualCLIPTextEncode or your sampler's positive/negative path.

    Installing it

    ComfyUI Manager → search ComfyUI-AutoMultiGPU, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nexusfinancial-dev/ComfyUI-AutoMultiGPU.git
    cd ComfyUI-AutoMultiGPU
    pip install -r requirements.txt
    

    Dependencies are just torch, accelerate, and safetensors. But - repeat after me - GGUF files require ComfyUI-GGUF to be installed too. The README doesn't mention it; the code throws "ComfyUI-GGUF is required" if you load a .gguf without it. Safetensors-only users are fine.

    Where people get burned

    The GGUF dependency is the classic. Also: this loader is the right tool when a model genuinely needs two encoders; if you're on SDXL with a single-encoder setup, this is just a heavier version of the single loader. And if you set cpu as the target, remember you've now got both encoders running through system RAM - it'll work, but encode time becomes a coffee break.

    CategoryAutoMultiGPU/modular

    Inputs (5)

    NameTypeDefaultDescription
    clip_name1COMBOFirst CLIP / Text Encoder (.safetensors or .gguf)
    clip_name2COMBOSecond CLIP / Text Encoder (.safetensors or .gguf)
    typeCOMBOautoComprehensive Architecture Model Type
    target_deviceCOMBOAuto (Secondary GPU - cuda:1)4 options: Auto (Secondary GPU - cuda:1), cuda:1, cuda:0, cpu
    cpu_offloadCOMBOauto_smart_offload3 options: auto_smart_offload, always_offload_to_cpu, disabled_vram_only

    Outputs (1)

    NameTypeDescription
    CLIPCLIP