Switch (Inverse) (Legacy)
An any-type A/B switch that keeps old workflows alive
- on_true
- on_false
- output
You have two model loaders, two LoRA stacks, or two prompt branches, and you want to flip between them with one boolean instead of rewiring the graph. That's the whole job of a switch node, and Switch (Inverse) (Legacy) does it with zero type fuss: a switch boolean plus on_true and on_false, any types at all, one output.
The mechanism is worth one honest sentence, because the name is a bit of a lie. Despite "Inverse" in the title, this node behaves like a plain A/B switch - when switch is true you get on_true, when false you get on_false. The "Inverse" label is legacy branding from the pack's history; the behavior is the boring, correct one. What makes it worth reaching for over core's own Switch is that it accepts anything - image, latent, model, conditioning, text - so it's a drop-in valve for whichever branch you want live.
It's also lazy: if switch is true, ComfyUI doesn't evaluate the on_false branch at all, and vice versa. That's not just a speed win; it means you can connect an optional or even broken upstream to the unused side and it won't crash the run.
The inputs that matter
- switch - the boolean selector. Wire it to a PrimitiveBoolean, another switch, a logic node, or a widget.
- on_true / on_false - the two candidates. Same type on both sides for a sane graph, though the node won't stop you from mixing.
The output
output, typed to whatever you plugged in. Wire it anywhere the selected value would have gone. This is the node you reach for when you want to keep two samplers in one workflow and pick one per run.
Installing it
Part of silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager → search ComfyUI-UtilsCollection → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart afterward. Dependencies are only opencv-python and typing-extensions. The "(Legacy)" marker means it's a compatibility alias for the pack's canonical UC_SwitchInverseNode - this id exists so workflows saved against older versions of the pack keep loading, and you may find the UC_-named version in a fresh node search.
Where people get burned
The lazy evaluation cuts both ways. If you're used to all upstream nodes always running, the surprise is that a branch you "connected" never executes when it isn't selected - so a node inside the dead branch that does something on execution (saves a file, prints, hits an API) silently doesn't. That's usually what you want, but it's a classic "why didn't my file save" moment. And if you came from an older pack where "(Inverse)" genuinely meant the selection was flipped, re-check which input you wired where - the naming won't save you, the boolean will.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| switch | BOOLEAN | — | |
| on_true | COMFY_MATCHTYPE_V3 | — | |
| on_false | COMFY_MATCHTYPE_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | COMFY_MATCHTYPE_V3 | — |