Latent Input Switch
Route between two latents with a boolean
Same idea as the number and image switches in this pack, but for latents. You wire in two latent inputs, flip a boolean, and one of them passes through. The WAS README calls it "Switch between two latent inputs based on a boolean switch." It's a small routing node, and it turns a rigid graph into one that can take one of two paths on command.
Where this actually earns its keep is branching pipelines. Say you have two ways to produce a latent - a fresh empty latent for txt2img versus an encoded image for img2img, or a plain sampler output versus an upscaled one - and you want to flip between them without rebuilding the graph. Drive the boolean and the sampler downstream just gets whichever latent you selected. It's the kind of node that makes a single workflow serve two jobs.
How it works
Two latents go in as A and B, plus a boolean. The boolean's state chooses which latent leaves the single output. It's a multiplexer - nothing about the latent is altered, it's purely which one continues down the wire. This is one member of WAS's whole Input Switch family (image, number, model, VAE, conditioning, latent), all built on the same boolean-selector pattern, so if you've used one you already know this one.
The inputs and outputs that matter
- Two latent inputs - the two candidates.
- A boolean switch - selects which latent passes through.
- One latent output - wire it into your KSampler, a VAE decode, or an upscale node.
I'm describing this from the README's stated behavior rather than a formal schema, so I won't invent extra ports - the two-in, boolean-selector, one-out shape is the whole node.
How to install it
Bundled with the WAS Node Suite:
- ComfyUI Manager: search was-node-suite-comfyui, install, restart.
- Manually:
cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, thenpip install -r requirements.txtagainst your ComfyUI Python, and restart.
No model, no heavy dependency - it's a routing node.
Common issues
The recurring misunderstanding, same as the other switches: this selects which latent flows onward, but it does not stop the unselected branch from computing. If branch B runs an expensive sampler you were hoping to skip, ComfyUI may still evaluate it when the graph is executed - a value switch routes results, it doesn't gate computation. To genuinely skip work, restructure the graph or use a bypass, not a switch after the fact.
The other classic: the two latents need to be compatible with whatever's downstream. Switching between latents of different sizes and then feeding a node that expects a fixed shape can error out depending on which branch is live - so a workflow that runs fine on false blows up on true. If a switch-driven graph works one way and breaks the other, check that both branches produce latents the downstream node can actually accept. And mind the boolean's polarity - if you get B when you wanted A, just flip it (or invert with Logic NOT).
And the pack caveat: WAS Node Suite has been retired since December 2023 - used constantly, unmaintained. If a ComfyUI update makes every WAS node vanish with an "Import Failed", that's suite-level dependency drift, not this node. Re-run requirements.txt against the correct Python environment (or the bundled install.bat) and restart.
Inputs (0)
No inputs
Outputs (0)
No outputs