Nodes/was-node-suite-comfyui/Conditioning Input Switch
ComfyUI Node Runs on cloud

Conditioning Input Switch

Toggle between two prompts in one graph

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Conditioning Input Switch

      Conditioning Input Switch lets you feed two CONDITIONING streams into one node and flip between them with a boolean. Straight from the README: "switch between two conditioning inputs." Conditioning is what your CLIP Text Encode produces - the encoded prompt the sampler actually consumes - so in practice this is a prompt switch. Point A and B at two different encoded prompts, toggle the boolean, and the same sampler runs whichever one you picked.

      Why you'd use it

      It's the clean way to A/B two prompts through an otherwise identical pipeline. Same model, same seed, same steps - only the conditioning changes. Instead of maintaining two graphs or dragging noodles around every time, you flip a switch. Toggle back and forth, compare on a fixed seed, and you're doing a proper controlled test where the only variable is the prompt.

      It's also a logic primitive. Drive the boolean from an upstream logic or number node and the graph chooses its prompt based on something computed - a conditional workflow instead of a static one. This is one of the whole WAS Input Switch family (image, latent, model, VAE, CLIP, ControlNet, number, text…); the conditioning one just happens to be the most useful in day-to-day prompt work, which probably explains why it pulls the best click-through of the bunch.

      How it works

      Two conditioning inputs, one boolean, one CONDITIONING output that goes to your KSampler's positive or negative input. The boolean picks the winner. Nothing to configure beyond wiring.

      The gotcha: it doesn't skip the unused branch

      Worth saying loudly because it surprises people. A switch does not save you the compute of the side you didn't choose. ComfyUI resolves all of a node's inputs before running it, so both conditioning branches get encoded whether or not you use them. For plain text prompts that's cheap and nobody notices. But if a branch does heavy conditioning work - long prompt processing, control conditioning, an expensive encode - you pay for both every run. If that cost matters, the lazy switches in rgthree-comfy evaluate only the selected branch and are the right tool. For "flip between prompt A and prompt B," WAS's switch is exactly what you want.

      Installing it

      Bundled with WAS Node Suite. Install the pack via ComfyUI Manager (search was-node-suite-comfyui, install, restart) or clone it:

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/was-node-suite-comfyui
      

      install requirements.txt, restart. No models, no heavy dependencies - pure routing.

      Troubleshooting

      The switch itself is about as robust as nodes come. The pack is the failure point: WAS Node Suite has been unmaintained since December 2023, and after a ComfyUI update the whole suite can throw "Import Failed" from a dependency-version clash (opencv is the usual culprit - WAS pins an older one). The fix is reinstalling requirements.txt into the correct venv (activate it, or use install.bat). Once the suite imports, everything downstream, including this, works.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs