Text Switch (GeN13)
25 prompts in one node, and only the one you pick actually runs
- chain
- chain
- STRING
- #01
- #02
- #03
- #04
- #05
- #06
- #07
- #08
- #09
- #10
- #11
- #12
- #13
- #14
- #15
- #16
- #17
- #18
- #19
- #20
- #21
- #22
- #23
- #24
- #25
The usual way to try five prompt ideas is five CLIP Text Encode nodes and a mess of bypassing. The usual way to batch them is a wildcard or a {red|blue|green} bracket and hope the combinations land. Text Switch (GeN13) is a third option: 25 named prompt boxes in one node, one selected, and only that one reaching your encoder.
It's the headline node of its pack, and the answer to a question the community keeps asking badly. Ask how to automate "100 images, prompt variations, seed reset every 5" and you're told to look for "a branch node to pick from 5 different pathways… I do not remember the precise nodes for that." This is that branch node, with the counter input built in.
What it actually does
count shows that many boxes, 1 to 25. select picks which one you get, as #01…#25. Type into the boxes, wire the STRING output into your CLIP Text Encode, done. The pick is the interesting part.
Chain them - the chain output of one into the chain input of the next - and numbering continues where the previous node stopped: five boxes in the first node, the second starts at #06. The first node owns the pick; the others dim their select and follow. The chain carries the selection, the text already found, and an offset equal to the total boxes upstream, so each node knows whether the pick is before it, inside it, or after it. A node only outputs text if the picked box lives inside it, so wire the STRING of the last node. The front end enforces that - on a non-last node the dot is dimmed and the link refused, because it would carry nothing.
Then there's select_num, the optional INT input. Feed it a number starting at 1 and it overrides select - this is how Counter (GeN13) or Trigger (GeN13) walk you through your prompts one queue at a time, or how Remote Text Switch drives one setting across a graph. Only the head node's select_num counts.
The best part is laziness. Each text_NN is declared lazy, and check_lazy_status resolves upstream only for the selected box - or a box whose #NN output something downstream is wired to. Put two different LLM rewrite chains on boxes #01 and #02 and flip between them: the one you didn't pick never executes. When that branch is a 20-second model call, it's the difference between switching prompts and paying for both.
The inputs and outputs that matter
count- how many boxes are visible; raise it as your list grows.select- the#NNyou want, when you're picking by hand.text_NN- the prompts themselves, typed in or fed from upstream.chain/select_num- optional. Chain links the next node;select_numhands the pick to an integer.
Outputs: chain to the next node, STRING for the chosen prompt, then #01…#25, each dumping that box's raw text regardless of selection. Only the first count box outputs are kept and trimmed from the end, so wires don't jump slots.
Two things you'd otherwise miss: every box has a title row (click the arrow or the #NN to fold/unfold, click #NN to select), saved in the workflow's node properties rather than the API prompt. And the head node gets a pick row, ‹ #07 title ›, that skips empty boxes, plus EXPAND ALL / COLLAPSE ALL for the chain.
Install
Manager: search GeN13, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/heigen13/ComfyUI-GeN13
pip install -r ComfyUI-GeN13/requirements.txt
requirements.txt is one package, nvidia-ml-py, for the pack's GPU monitor - nothing here needs it. The pack also ships four example workflows in the Templates panel under ComfyUI-GeN13, including a Text Switch chain, which is a faster way in than building one cold.
ComfyUI-GeN13 is a one-person, small, new pack (GPL-3.0, © GeN's Studio Inc.). Its Reddit footprint is zero, so the source and tooltips are your only documentation. Every node ends in (GeN13); double-click the canvas and type GeN13 to list them.
Where people trip
Empty selection, silent blank prompt. Pick an empty box, or send a select_num past the chain's last box, and the node outputs an empty string. ComfyUI runs happily with an empty prompt - nothing errors, the image is just vague and bad. If generations got worse for no reason, check which box is selected.
Bypassed select_num source. If the Counter feeding select_num is bypassed or muted it drops out of the prompt, and the node falls back to its select dropdown. Not a crash - a pick you didn't choose.
Last thing: the pack targets ComfyUI 0.40's classic canvas (Nodes 2.0 supported for previews), and Text Switch's chrome is all DOM widgets - the known risk area when the frontend gets rewritten, per the rgthree saga.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 21–25 | Box count: number of text boxes shown; the rest are hidden. |
| select | COMBO | #01 | Select: the box to output. In a chain, the first node controls it, and numbering continues from the previous node's last box. |
| text_01 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_02 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_03 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_04 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_05 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_06 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_07 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_08 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_09 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_10 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_11 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_12 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_13 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_14 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_15 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_16 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_17 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_18 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_19 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_20 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_21 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_22 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_23 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_24 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| text_25 | STRING | Text: type here or connect an upstream string. A connected upstream runs only when this box is selected. | |
| chainopt | G13_SWITCH | Chain: connect the chain output of the previous Text Switch; numbering continues from its last box. | |
| select_numopt | INT | 1–9999 | Select input: an INT, such as from Counter or Trigger, sets the box number directly, starting at 1; overrides select. |
Outputs (27)
| Name | Type | Description |
|---|---|---|
| chain | G13_SWITCH | Chain: connect to the chain input of the next Text Switch. |
| STRING | STRING | Text: the selected box; empty when the selected box is in a later node of the chain. |
| #01 | STRING | Text: this box's content, regardless of select. |
| #02 | STRING | Text: this box's content, regardless of select. |
| #03 | STRING | Text: this box's content, regardless of select. |
| #04 | STRING | Text: this box's content, regardless of select. |
| #05 | STRING | Text: this box's content, regardless of select. |
| #06 | STRING | Text: this box's content, regardless of select. |
| #07 | STRING | Text: this box's content, regardless of select. |
| #08 | STRING | Text: this box's content, regardless of select. |
| #09 | STRING | Text: this box's content, regardless of select. |
| #10 | STRING | Text: this box's content, regardless of select. |
| #11 | STRING | Text: this box's content, regardless of select. |
| #12 | STRING | Text: this box's content, regardless of select. |
| #13 | STRING | Text: this box's content, regardless of select. |
| #14 | STRING | Text: this box's content, regardless of select. |
| #15 | STRING | Text: this box's content, regardless of select. |
| #16 | STRING | Text: this box's content, regardless of select. |
| #17 | STRING | Text: this box's content, regardless of select. |
| #18 | STRING | Text: this box's content, regardless of select. |
| #19 | STRING | Text: this box's content, regardless of select. |
| #20 | STRING | Text: this box's content, regardless of select. |
| #21 | STRING | Text: this box's content, regardless of select. |
| #22 | STRING | Text: this box's content, regardless of select. |
| #23 | STRING | Text: this box's content, regardless of select. |
| #24 | STRING | Text: this box's content, regardless of select. |
| #25 | STRING | Text: this box's content, regardless of select. |