Four Input Text Switch
The tiny A/B/C/D node that earns its place
- STRING
Every once in a while a workflow needs to flip between a handful of prompts without you editing a node between runs. That's this node: four text inputs, a switch selector, one string out. Set the switch to 2 and out comes text2. That's the entire job, and it's genuinely useful for prompt A/B testing against a fixed seed, or for toggling between different style prefixes without hunting through a big graph.
It's one of the plain-vanilla variants in the Endless pack (no βΎοΈπβ¨ branding - those are the newer "ESS" nodes). The family goes four, six, and eight inputs; this is the compact entry point. The README frames the whole switch family as "useful for multiple inputs for prompt creation," which is the honest pitch: they exist so you can prep a set of options and not think again.
Inputs and outputs
switch- integer 1 to 4. The selector. Everything follows from this.text1β¦text4- all optional, defaulting to empty strings. The README notes you only need a minimum of one input; the rest can stay unconnected.
Output: a single STRING - the text at the selected position.
Two small details worth knowing. First, all the inputs are optional here, so you can build a switch that only uses three of the four slots and the fourth just sits there empty. Second, this node is marked as an output node in the pack's registry, meaning it executes even when nothing is connected downstream - handy when its purpose is to feed a filename or a console rather than a sampler.
Where it fits
Pair it with a seed-fixed setup and you get clean A/B/C/D comparisons: same seed, same settings, only the prompt changes. Or chain it before the Endless batch prompt nodes to pick which list renders. If you're already running the Endless pack for the batch nodes or the Image Saver, this costs you nothing extra to drop in. If you're not running the pack at all, know that any quality-of-life pack - rgthree's included - has an equivalent switch, and you don't need to adopt a whole hobby pack just for this one.
Installing it
Ships in Endless πβ¨ Nodes by tusharbhutt:
cd ComfyUI/custom_nodes
git clone https://github.com/tusharbhutt/Endless-Nodes
# restart ComfyUI
Or via ComfyUI Manager β search "Endless". No dependencies or model files; it appears under the "Endless πβ¨" menu.
Gotchas
Keep switch between 1 and 4 - out of range and you get an empty string back, which downstream can silently turn into an empty prompt. And remember the pack's caveat: single maintainer, AI-assisted, rewritten in June 2025. A node this small is near-bulletproof, but the pack's support cadence is what it is.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| switch | INT | 11β4 | β |
| text1opt | STRING | β | |
| text2opt | STRING | β | |
| text3opt | STRING | β | |
| text4opt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |