Prompt Switch (20)
Twenty prompt slots — and when that's not overkill
- selected_text
The same node as the Prompt Switch (10), just wider. Prompt Switch (20) takes an id between 1 and 20 and passes through the matching text_01–text_20 input, out as selected_text. Same mechanism, same two-digit labels (text_02, not text_2), same behavior where an unconnected pin outputs an empty string instead of erroring, same ,\n appended to the output so it chains into an aggregator.
When is twenty inputs not ridiculous?
A couple of honest use cases exist. A catalog workflow where prompts come from somewhere else - generated, loaded from files, or swept per image in a batch - and you want one graph that covers the whole set, picked by number. Or a character/outfit matrix where "which of twenty variants" genuinely changes per run. Those are real.
But if you're hand-wiring twenty individual strings into the graph, ask whether twenty is the problem. At that point the pack's file-based selectors (the nodes that read data/character/*.txt into a dropdown) are a better home for the text than twenty spaghetti wires - that's literally what the pack was built for, and it's why the README frames everything around text files, not graph inputs.
The inputs and outputs
From the schema: id is required, INT, default 1, min 1, max 20. text_01–text_20 are optional STRINGs with forceInput, so they want upstream connections. Output is selected_text (STRING). Nothing else - it's a dumb pipe, and that's a feature.
The practical downside
The silent out-of-range failure gets worse as the range grows. id = 21 from an upstream node looks for text_21, finds nothing, and quietly returns an empty string - no error, no red highlight. With twenty pins on one node, the canvas footprint is also real; expect the thing to be large. And because id is a static INT input, there's no auto-advance: if you want to cycle or randomize, you supply the integer source yourself (the pack's ID Select node, or any INT node you have around).
Install
Identical to the rest of the pack - no dependencies, no models, MIT:
cd ComfyUI/custom_nodes
git clone https://github.com/itom0717/ComfyUI-Prompt-String-Selector
Restart ComfyUI, or install via ComfyUI Manager → Install via Git URL.
The verdict
The (5) or (10) is what 95% of people want. Reach for the 20 when you have a real library behind it, not as a default - and if you do, keep your prompt text in files rather than in the node, so the graph stays readable.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| id | INT | 11–20 | — |
| text_01opt | STRING | — | |
| text_02opt | STRING | — | |
| text_03opt | STRING | — | |
| text_04opt | STRING | — | |
| text_05opt | STRING | — | |
| text_06opt | STRING | — | |
| text_07opt | STRING | — | |
| text_08opt | STRING | — | |
| text_09opt | STRING | — | |
| text_10opt | STRING | — | |
| text_11opt | STRING | — | |
| text_12opt | STRING | — | |
| text_13opt | STRING | — | |
| text_14opt | STRING | — | |
| text_15opt | STRING | — | |
| text_16opt | STRING | — | |
| text_17opt | STRING | — | |
| text_18opt | STRING | — | |
| text_19opt | STRING | — | |
| text_20opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected_text | STRING | — |