Inversed Switch (Any)
Send one input to one of many outputs
- input
- *
Most switches are funnels: many inputs, one output, pick which input comes through. Inversed Switch (Any) is the opposite - one input, many outputs, pick which output it goes to. It's a router. You feed it one value and a select number, and it fires that value out of the corresponding output slot while the others stay dark.
Where this matters is conditional workflows. Paired with a comparison or an if-node, you can route your latent (or image, or anything) down one of several branches depending on some condition - send it to the upscale branch if it passed a check, the redo branch if it didn't. It's one of Impact Pack's experimental logic nodes, so it's more "build-your-own-control-flow" than everyday use, and honestly most people never touch it. But when you're building a workflow that has to decide something, this is the fork in the road.
How it works
The node takes a single wildcard-typed input and a select index. Based on select, it activates the matching output and passes the input through it; the unselected outputs produce nothing, which - combined with ComfyUI's lazy execution - means the branches hanging off those outputs don't run. That's the point: you're not just labeling a path, you're choosing which downstream subgraph executes.
The inputs and outputs that matter
input- the value to route. Wildcard-typed, so it takes anything: latent, image, model, whatever. Its type gets locked in when you connect it.select(default1, min1) - which output slot the input goes to. Set it to 1 and the value comes out the first output; set it to 2 and it takes the second.sel_mode(optional boolean) - controls whether the selection is read as a widget value or taken live from an input each run, which matters whenselectis driven by another node rather than typed by hand.
The output is a wildcard (*) that expands to multiple slots as you use it - the node grows output connections, and only the selected one carries the value.
How to install it
Ships with the Impact Pack. ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
pip install -r requirements.txt
then restart. No models or extra dependencies.
Common issues & troubleshooting
"Type validation" error messages. Impact Pack's switches use a wildcard type to accept arbitrary connections, and the README calls this out directly: until ComfyUI officially supports dynamic types, these nodes work fine but may still throw type-validation warnings. If the graph runs correctly, those messages are cosmetic.
Nothing comes out. Check that select points at an output you've actually connected. select starts at 1, not 0 - the first slot is 1. If it's indexing a slot with nothing wired to it, downstream gets nothing.
It's not behaving like a condition. This node only routes; it doesn't decide. You need something upstream producing the select value - a compare node, an if-node, an int - for it to act conditionally. On its own it just sends the input to a fixed slot. And this is genuinely experimental loop/logic territory in Impact Pack, so expect to build the control logic yourself rather than find a ready-made example.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 11–999999 | The output number you want to send from the input |
| input | * | Any input. When connected, one more input slot is added. | |
| sel_modeopt | BOOLEAN | false | In the case of 'select_on_execution', the selection is dynamically determined at the time of workflow execution. 'select_on_prompt' is an option that exists for older versions of ComfyUI, and it makes the decision before the workflow execution. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | Output occurs only from the output selected by the 'select' value. When slots are connected, additional slots are created. |