ComfyUI Node

Dual CLIP Selector

The SDXL text-encoder pair, wrapped so it's repeatable

By kinorax·Created 5 months ago·Updated about a month ago· 2
Dual CLIP Selector
    • clip
    • clip_name1
    • clip_name2
    clip_name1
    clip_name2
    typesdxl
    devicedefault
    sha256_1
    sha256_2

    SDXL doesn't use one text encoder, it uses two: the base CLIP-L and a second, bigger encoder whose outputs get merged before conditioning. Stock ComfyUI handles that pairing with a single DualCLIPLoader node. Dual CLIP Selector is this pack's version of that choice - two dropdowns instead of one, and the pair gets remembered as part of your image's metadata so the exact encoder setup reproduces itself when you reopen the image.

    If you read the CLIP Selector article, this is the same story with one more dropdown. The whole reason these selector nodes exist is the pack's reproducibility loop: your model choices ride along in image_info, get saved into the PNG's infotext, and come back out when you load the file. SDXL setups are exactly where you want that, because getting the wrong second encoder silently degrades output quality.

    How it works

    clip_name1 and clip_name2 are dropdowns over your text_encoders folder - pick the primary encoder first and the secondary one second. The type field (default sdxl) is passed through to the underlying DualCLIPLoader and tells ComfyUI how to combine the pair; device (default default) picks where the CLIPs run. Both mirror what the stock loader would take, because this node ultimately calls the same loading machinery - it just resolves and packages the choices first.

    Execution wraps the pair as a single IPT-Clip value on the clip output, ready for the pack's Load New Model / Use Loaded Model pipeline. The other two outputs, clip_name1 and clip_name2, pass the selected filenames through - handy for labels, XY-plot axes, or writing the choice into metadata yourself.

    The optional sha256_1 and sha256_2 inputs feed the right-click View Model Info... action, which looks each encoder up on Civitai by hash so you can confirm the file you're loading is the release you think it is. Leave them empty unless you have a specific reason to pin them.

    What you actually set

    Just the two dropdowns, honestly. type stays sdxl for the vast majority of uses, and device rarely needs touching. If your encoders aren't showing up, they're in the wrong folder - this node reads ComfyUI/models/text_encoders, and SDXL's second encoder is often the sd_xl_offset or a refiner CLIP sitting elsewhere.

    Why bother vs. the stock DualCLIPLoader

    If you never save-and-reload your own images, the stock node does the same job with fewer moving parts. The payoff here is the same as every selector in this pack: the encoder pair becomes part of the reusable metadata, so a workflow you open next month (or an image someone else opens) restores the exact encoder setup that produced it. For SDXL users who iterate across checkpoints that each prefer slightly different CLIP combos, centralizing that choice at the top of the graph beats hunting loader nodes.

    One thing worth knowing: the pack also ships Triple CLIP Selector and Quadruple CLIP Selector for models that want three or four encoders (some of the newer architectures go past the SDXL pair). If you only see Dual, you're on a standard SDXL graph and this is the one you want.

    Installing

    Part of kinorax/comfyui-info-prompt-toolkit:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
    cd comfyui-info-prompt-toolkit
    pip install -r requirements.txt
    

    or search "Info-Prompt-Toolkit" in ComfyUI Manager, then restart. No model files to download - it only references encoders already in your text_encoders folder.

    CategoryInfo-Prompt-Toolkit/ImageInfo

    Inputs (6)

    NameTypeDefaultDescription
    clip_name1COMBOSelect first CLIP
    clip_name2COMBOSelect second CLIP
    typeCOMBOsdxlCLIP type passed by DualCLIPLoader
    deviceCOMBOdefaultCLIP device passed by DualCLIPLoader
    sha256_1optSTRINGCached SHA256 for clip_name1 used by View Model Info fallback
    sha256_2optSTRINGCached SHA256 for clip_name2 used by View Model Info fallback

    Outputs (3)

    NameTypeDescription
    clipIPT-Clip
    clip_name1*
    clip_name2*