SwitchAnyCombo
A switch that names its options after your actual nodes
- input_1
- input_2
- input_3
- input_4
- input_5
- input_6
- input_7
- input_8
- input_9
- input_10
- output
Most switch nodes make you choose between input_1 and input_2 and hope you remember which is which. SwitchAnyCombo does the remembering for you: it scans whatever you've wired in and repopulates its dropdown with the names of the upstream nodes. Wire in a "portrait prompt" node and a "landscape prompt" node, and the dropdown literally says so. One click changes which branch the graph takes.
That alone is worth it for A/B testing. But the real feature is hidden in the description: "Unselected inputs stay lazy and will not execute." This isn't a passive data switch - it's a genuine execution-flow gate.
How it works
SwitchAnyCombo exposes up to ten * inputs (input_1 through input_10). A frontend extension watches your connections, reads the title of each upstream node, and rebuilds the selected dropdown with friendly labels - that's why the dropdown shows node names instead of generic port names. The serialized value still maps back to the underlying port, so your saved workflow stays stable.
On the Python side it's the lazy pattern from the node-plumbing playbook: check_lazy_status looks at the selected port and tells ComfyUI to only compute that input. Everything else on the node reports "don't need it," which means the entire upstream chain behind an unselected input never runs. No wasted sampling, no side effects from a branch you weren't testing - deterministic, fast, and easy to debug. Same idea as SwitchAnyMute from this pack, but as a many-way menu instead of a two-way toggle.
What you'd use it for
Anywhere you want to swap pipelines without rewiring: prompt A vs prompt B, a fast checkpoint vs a slow one, two different upscale paths, a ControlNet branch you toggle on and off. Build both branches once, then flip between them from a single dropdown. It's the ComfyUI equivalent of a switch statement, and it's the one I'd actually reach for out of the pack's switch family because the labels remove all the guesswork.
The catches
The dropdown only lists connected inputs - that's the source of its magic and its limit. If you haven't wired anything it falls back to a bare input_1. If you select a port that ends up with nothing connected at execution (say, a connection got removed), it prints a warning and outputs None, which will then flow downstream and usually surface as a type error at the next node. And lazy-gating works because ComfyUI treats the selection as authoritative - so if you're using it to mute heavy branches, make sure the workflow is saved with the selection you actually want, or a fresh load might quietly pick a different branch.
Installing it
It's part of ComfyPanel:
cd ComfyUI/custom_nodes
git clone https://github.com/Ginolazy/ComfyPanel
Restart ComfyUI, or search ComfyPanel in ComfyUI Manager. Requirements are the standard torch/numpy/Pillow plus kornia, scipy, and opencv-python; Manager will flag missing ones. No models to download, no Photoshop needed.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| selected | COMBO | input_1 | 1 options: input_1 |
| input_1opt | * | — | |
| input_2opt | * | — | |
| input_3opt | * | — | |
| input_4opt | * | — | |
| input_5opt | * | — | |
| input_6opt | * | — | |
| input_7opt | * | — | |
| input_8opt | * | — | |
| input_9opt | * | — | |
| input_10opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |