ComfyUI Node

CLIP Name

Pick your text encoder once, use it everywhere

By lihaoyun6·Created 12 months ago·Updated 13 days ago· 20
CLIP Name
    • clip_name
    clip_name

    CLIPName is a value node with a very specific job: it lists the text encoders in your models/text_encoders folder and hands the one you pick to you as a plain string. Nothing gets loaded, nothing gets encoded - you get a name, and you wire that name wherever a CLIP filename is expected.

    Why bother? Because "which text encoder is this workflow using" is a question you end up asking constantly once you run more than one model family. SD 1.5, SDXL, Flux, Qwen-Image - each wants its own CLIP, and a workflow with two or three encoders (Flux runs a separate CLIP-L and T5) is where typing the name in multiple places starts biting you. One dropdown, one selection, every consumer follows.

    How it works

    The dropdown is populated from folder_paths.get_filename_list("text_encoders"), so it mirrors exactly what ComfyUI's CLIPLoader sees. The output is the pack's "any" type, so it plugs into any string input. The intended move is the standard one: right-click a CLIPLoader (or the pack's own CLIPTextEncodeCached) → Convert clip_name to input, and wire this node in. The loader's widget disappears; the name node owns the choice.

    It's a sibling of CheckpointName, LoraName, VAEName and the rest in the same pack - same shape, different folder.

    Inputs and outputs

    • clip_name - dropdown of your text encoders. That's it.

    One output: clip_name (*), the filename as a string.

    A genuinely useful variant of the same trick: wire the name into a filename formatter or a metadata node, so every output PNG you save records which text encoder made it. When you come back three weeks later to a great image and wonder what stack produced it, you'll be glad the name was in the filename.

    Installing it

    Part of ComfyUI-lhyNodes:

    • ComfyUI Manager → search lhyNodes → Install, restart.
    • Or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
    python -m pip install -r ComfyUI-lhyNodes/requirements.txt
    

    Restart ComfyUI.

    Where people get burned

    Same trap as every name node in this family: it's text, not a loader. It doesn't read the file, so a misspelled or renamed encoder will make the downstream loader fail validation even though the dropdown looked fine. And the list is captured when the workflow loads - add a new text encoder mid-session and you may need to reload the workflow to see it. Other than that, it's the rare node with exactly one job and no surprises.

    CategorylhyNodes/Utils

    Inputs (1)

    NameTypeDefaultDescription
    clip_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    clip_name*