Nodes/PromptModels Studio/Selector de Prompts
ComfyUI Node

Selector de Prompts

Twelve prompt slots, one clean output

By cdanielp·Created 9 months ago·Updated 2 months ago· 28
Selector de Prompts
    • text
    fallbackp1
    join_with\n\n
    modeauto
    on1true
    on2false
    on3false
    on4false
    on5false
    on6false
    on7false
    on8false
    on9false
    on10false
    on11false
    on12false
    p1
    p2
    p3
    p4
    p5
    p6
    p7
    p8
    p9
    p10
    p11
    p12

    You know the workflow: you have three or four prompt variants - a positive, a backup, a style variation - and you keep swapping which one is wired in. This node is the clean way to manage that. Twelve multiline prompt slots, each with its own on/off switch, and one text output that either passes a single prompt through or joins several together. Same idea as the pack's image selector, but for strings, and it costs nothing - no API, no keys, pure text handling.

    The typical use: keep all your prompt experiments in the graph, toggle exactly one on, and never rewire a wire again. Flip from "portrait of a knight" to "portrait of a knight, golden hour" by clicking a switch instead of editing and risking a typo.

    The modes and joins

    • auto - one active prompt passes through; multiple active prompts get joined.
    • single_only - errors if more than one slot is on, so you can't accidentally batch.
    • join_only - well, joining is the point of multi; it forces the join path.

    When multiple prompts are active, join_with controls the glue: \n\n (default), \n, |, or , . This matters more than it looks - joining with commas makes a single run-on prompt; joining with a blank line keeps them as separate prompt paragraphs, which behaves differently in the text encoder. For SDXL/Flux-style prompt blocks, \n\n is usually the right call.

    fallback decides what happens if every slot is off or empty: raise, or fall back to slot 1.

    The inputs that matter

    • on1 … on12 - the toggles.
    • p1 … p12 - the prompts themselves, all multiline. Empty slots are skipped automatically.
    • join_with / mode / fallback - the behavior knobs above.

    Output: a single text STRING, ready for a CLIP text encoder or whatever consumes prompts.

    Installing it

    ComfyUI Manager → search "COMFYUI_PROMPTMODELS" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
    

    No API key. ComfyUI >= 0.26.0.

    The honest take

    It's a simple node with two gotchas. First, empty slots are silently skipped - if you meant to include an empty prompt as a "blank" test, it just won't appear, and the join happens without it. Second, the \n\n default means the output literally contains blank lines; if you pipe it into a node that trims whitespace aggressively, your structure can collapse. And the usual workflow-state warning applies: switches are saved with the workflow, so an old toggle you forgot about determines what runs. One tip: name your slots with the switches and you get a mini prompt library that's self-documenting in the graph.

    CategorySelectores Pro

    Inputs (27)

    NameTypeDefaultDescription
    fallbackCOMBOp12 options: error, p1
    join_withCOMBO\n\n4 options: \n\n, \n, |, ,
    modeCOMBOauto3 options: auto, single_only, join_only
    on1BOOLEANtrue
    on2BOOLEANfalse
    on3BOOLEANfalse
    on4BOOLEANfalse
    on5BOOLEANfalse
    on6BOOLEANfalse
    on7BOOLEANfalse
    on8BOOLEANfalse
    on9BOOLEANfalse
    on10BOOLEANfalse
    on11BOOLEANfalse
    on12BOOLEANfalse
    p1optSTRING
    p2optSTRING
    p3optSTRING
    p4optSTRING
    p5optSTRING
    p6optSTRING
    p7optSTRING
    p8optSTRING
    p9optSTRING
    p10optSTRING
    p11optSTRING
    p12optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING