Selector de Prompts
Twelve prompt slots, one clean output
- text
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.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| fallback | COMBO | p1 | 2 options: error, p1 |
| join_with | COMBO | \n\n | 4 options: \n\n, \n, |, , |
| mode | COMBO | auto | 3 options: auto, single_only, join_only |
| on1 | BOOLEAN | true | — |
| on2 | BOOLEAN | false | — |
| on3 | BOOLEAN | false | — |
| on4 | BOOLEAN | false | — |
| on5 | BOOLEAN | false | — |
| on6 | BOOLEAN | false | — |
| on7 | BOOLEAN | false | — |
| on8 | BOOLEAN | false | — |
| on9 | BOOLEAN | false | — |
| on10 | BOOLEAN | false | — |
| on11 | BOOLEAN | false | — |
| on12 | BOOLEAN | false | — |
| p1opt | STRING | — | |
| p2opt | STRING | — | |
| p3opt | STRING | — | |
| p4opt | STRING | — | |
| p5opt | STRING | — | |
| p6opt | STRING | — | |
| p7opt | STRING | — | |
| p8opt | STRING | — | |
| p9opt | STRING | — | |
| p10opt | STRING | — | |
| p11opt | STRING | — | |
| p12opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |