Nodes/DemonAlone-nodes-ComfyUI/Text Encoder Selector
ComfyUI Node

Text Encoder Selector

One dropdown for whichever CLIP file you've got installed

By DemonAlone·Created 7 months ago·Updated 22 days ago· 3
Text Encoder Selector
    • enc_name
    • enc_name_str
    enc_name

    This one's plumbing, not magic - but it's plumbing that's genuinely handy the moment you're juggling more than one text encoder. Modern ComfyUI setups increasingly aren't a single fixed CLIP anymore: Flux wants a dual CLIP/T5 pair, SDXL still runs its own CLIP-G/CLIP-L combo, and newer models like Klein condition through an LLM encoder entirely. If your workflow needs to pick which encoder file to load - as a variable, not a hardcoded choice - this node gives you that as a clean, swappable dropdown.

    What it does

    enc_name is the whole node: a single dropdown populated from whatever's sitting in your ComfyUI text_encoders folder. Pick one, and you get two outputs carrying the same choice in two different shapes. enc_name comes out typed as the same enum/combo the dropdown itself uses - so it's built to wire directly into another node's encoder-selection input if that node exposes one as a connection rather than a fixed widget. enc_name_str gives you the plain filename as text, which is what you want if you're logging which encoder you used, building a filename, or feeding it into any node that just wants a string rather than a typed model reference.

    There's no logic beyond that. It doesn't load the encoder itself - it just names one, in a form other nodes can consume.

    Two other nodes in this same pack, Patch Model Selector and Diffusion Model Selector, follow the identical pattern pointed at different folders (patches and diffusion_models respectively). All three exist because ComfyUI's stock file-picker widgets are fixed - great for a workflow you're never going to vary, useless the moment you want that choice driven by something else in your graph, like a loop or a saved preset. Wrapping the same dropdown as a proper connection-typed node is the trick, applied consistently across the file types this pack cares about.

    Installing it

    Via ComfyUI Manager: search DemonAlone-nodes-ComfyUI and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DemonAlone/SimpeStringGenerator_ComfyUI
    

    Restart ComfyUI afterward. No extra dependencies, no models to download - the pack's README is just a short credits list crediting a handful of better-known packs (mikey_nodes, ComfyUI_essentials, was-node-suite-comfyui, qq-nodes-comfyui) as inspiration for various nodes in the set. This is a small, low-traffic personal utility pack rather than something with an established community track record - don't expect tutorials or troubleshooting threads for it specifically.

    Where people get burned

    If the dropdown shows nothing, or shows options you didn't expect, remember this node only mirrors what's physically in your text_encoders folder - it doesn't ship, download, or validate anything. An empty list means an empty folder, not a bug.

    The other snag is type mismatch further downstream: enc_name_str is plain text and won't connect to anything expecting a real model/encoder-type input - ComfyUI will simply refuse that wire. Use the enc_name output for anything that actually needs to resolve to a loadable encoder, and save enc_name_str for display, logging, or string-building purposes only.

    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    enc_nameCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    enc_name
    enc_name_strSTRING