Nodes/Sage Utils/Dual CLIP Selector
ComfyUI Node

Dual CLIP Selector

Document both SDXL text encoders without loading either

By arcum42·Created 2 years ago·Updated 28 days ago· 33
Dual CLIP Selector
    • clip_info
    clip_name_1
    clip_name_2
    clip_typesdxl

    SDXL and its whole family (Illustrious, NoobAI, Pony and friends) don't use one text encoder - they use a pair: the big CLIP-G and the smaller CLIP-L working together to tokenize your prompt. That's why an SDXL workflow's loader has two CLIP slots. Dual CLIP Selector is the metadata-side version of that: it lets you pick the two CLIP models from dropdowns and outputs a combined clip_info bundle describing the pair, without loading either into VRAM.

    Three inputs: clip_name_1 and clip_name_2 (the two halves of the pair, populated from your models/clip folder) and clip_type, which defaults to sdxl - exactly the loader type an SDXL dual-CLIP setup needs. The output is a single clip_info of type MODEL_INFO that records both encoders and their details. In the Sage Utils metadata stack, that's what feeds Construct Metadata so your PNG's params reflect the full encoder pair that actually conditioned the image. No GPU work happens here; the node is pure selection and lookup, with the same hash-and-cache mechanism (sage_cache_hash.json / sage_cache_info.json under comfyui/user/default/SageUtils/) as the single-CLIP selector.

    The selector-vs-loader distinction from the rest of the pack applies unchanged: selectors choose and describe, loaders load. Your actual CLIP loading and encoding happens in the conditioning nodes; this node exists so the metadata knows which encoders were involved. Because it's just data, it's cheap to keep in a workflow permanently - which is the intended design.

    When would you use this instead of the single CLIP Selector? Follow your checkpoint. If your model is SDXL-lineage (including the popular Illustrious/Pony finetunes), it wants the dual pair and this is the right selector. If it's a Flux or Chroma-class model with a different encoder setup, use the single selector with the matching clip_type instead. The clip_type default of sdxl is a strong hint about what the pack assumes most users are running.

    One practical note that applies to all the selectors in this pack: they only know about the files in your model folders, so the dropdowns always match your actual install. And since the author runs Sage Utils as a personal project, if a model shows sparse info on first selection, give the pack's Model Scan & Report a run once to warm the Civitai cache - after that everything's local and fast.

    Install

    ComfyUI Manager → search Sage Utils → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/arcum42/ComfyUI_SageUtils.git
    cd ComfyUI_SageUtils && pip install -r requirements.txt
    

    Restart ComfyUI. Only dependency is dynamicprompts; no model downloads from the pack. Wire clip_info into Construct Metadata Flexible and the encoder pair lands in your image's params.

    CategorySage Utils/selector

    Inputs (3)

    NameTypeDefaultDescription
    clip_name_1COMBOChoose the first CLIP model for the pair.
    clip_name_2COMBOChoose the second CLIP model for the pair.
    clip_typeCOMBOsdxlChoose the CLIP loader type for this dual CLIP pair.

    Outputs (1)

    NameTypeDescription
    clip_infoMODEL_INFOCombined CLIP model info for the selected pair.