Text Input Switch
Toggle between two text inputs in ComfyUI
Text Input Switch picks one of two text inputs and passes it through, based on a boolean. Flip the switch and you swap which string flows downstream - into your prompt, a save node, wherever. It's the text member of WAS Node Suite's "Input Switch" family, and it's the node you want whenever your workflow needs to choose between two bits of text without you rewiring anything.
The everyday use is A/B prompting. Wire two different prompts into the switch, feed the output to your text encoder, and toggle between them from one control - same seed, same everything else, two prompts, clean comparison. Or use it as a mode selector: prompt A for one style, prompt B for another, one flag deciding.
How it works
Two text inputs go in, plus a boolean that decides the winner. One boolean value forwards the first input; the other forwards the second. Whatever's on the losing side is ignored. The chosen string comes out the single output and continues down the graph. Same pattern as WAS's Image Input Switch, Number Input Switch, and the rest - the whole family gates a data type on one boolean.
Because it's just choosing which string to pass, you can chain and nest these for more than two options, though past three or four it gets messy and a dedicated multi-way switch is cleaner.
The inputs and outputs that matter
The connections that matter are the two text inputs you're choosing between and the boolean that selects. The output is the selected text. Drive the boolean from a Logic Boolean Primitive for a manual toggle, or from any boolean-producing node (a comparison, a logic gate) to make the choice automatically based on something in the graph.
How to install it
Bundled in WAS Node Suite. Install once via ComfyUI Manager (search WAS Node Suite, install, restart) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
pip install -r was-node-suite-comfyui/requirements.txt
then restart. On Windows portable, run the pip step with python_embeded\python.exe -s -m pip install -r ... (or install.bat) so requirements install into ComfyUI's Python. No models needed.
Common issues & troubleshooting
Switch direction feels inverted. Which boolean value selects input 1 vs input 2 is easy to get backwards. If the toggle picks the opposite text from what you expect, just flip the boolean instead of swapping the two wires. Do a quick test and remember which way is which.
ASCII vs STRING type mismatch. This is a WAS-specific wrinkle. Older WAS text nodes emitted ASCII; the pack switched to STRING as the preferred type (the README flags ASCII as deprecated as of the May 2023 update, with a legacy flag in was_suite_config.json). If a wire refuses to connect between text nodes, you're likely mixing an old ASCII output with a STRING input - update the nodes or check that legacy flag.
One input is empty and it passes empty. The switch forwards exactly what it's given. If the selected branch's text is blank, you get blank downstream - the switch doesn't fall back to the other input. Make sure the branch you're selecting actually has content.
The suite won't import. WAS Node Suite is large and unmaintained since late 2023; the recurring failure is an "Import Failed" after a ComfyUI update, from a dependency version clash (opencv is the usual suspect). Reinstall the requirements against your ComfyUI Python and restart. The switch is trivial and stable - the suite install is the fragile part.
Inputs (0)
No inputs
Outputs (0)
No outputs