🎚️ Switcher
Pick any of ten inputs by number
- any1
- any2
- any3
- any4
- any5
- any6
- any7
- any8
- any9
- any10
- output
If the 🔀 Switch in this pack is an if/else, the 🎚️ Switcher is the case statement - or a TV channel dial. It takes up to ten any inputs and one select integer, and passes through whichever input the number points at. select = 3 → you get any3. Change it to 7 → you get any7. It's one step up from the two-way Switch and it's what you reach for when a workflow has more than two states.
The genuinely nice part is the dynamic ports. The node starts with a couple of inputs and grows as you connect: plug into any3 and it adds any4, connect that and any5 appears, and so on up to ten. Disconnect and the empty port retracts. The selected socket gets a ▶ marker and the output label shows the type of the value currently flowing through, so you can see at a glance that this thing is routing, say, a MODEL rather than an IMAGE. That dynamism is a frontend behavior, but the mechanism underneath is simple: one select INT (1–10, defaults to 1) plus ten optional wildcard * sockets, and the node looks up any{select} in its inputs and returns that value.
Two traps, and one of them is silent. First, the index is 1-based. If you think of your ports as "0 through 9" you will consistently be off by one and pick the neighbor. The dial and the port numbers agree - port any2 means select = 2 - so just read them literally. Second, and sneakier: if select points at a port you never connected, the node doesn't error - it emits an ExecutionBlocker, which silently kills everything downstream. Your preview just goes black and nothing tells you why, because a value was produced, just an empty one. If you're driving select from a Judge or a random number, clamp it to the number of inputs you actually wired. ComfyUI will not do that for you.
Like the rest of the pack, it always re-executes (IS_CHANGED returns float("NaN")), so flipping the dial takes effect instantly - no "why didn't it change" refresh dance. That also means it's permanently cache-dirty, which is the usual trade for an interactive switch; don't park one in front of a model loader if you care about not re-running it.
Where do you actually use this? Multi-LoRA test rigs (ten LoRA loaders, one Switcher, flip the dial to A/B/C your styles), multi-model comparisons, or a "preset picker" where select is driven by a single INT you can convert to an input and control from anywhere. It plays perfectly with Judge output feeding the select - Judge computes a condition, Switcher routes to the matching branch.
Installation is pack-level: ComfyUI Manager → search "ComfyUI-Logic-nodes", or
cd ComfyUI/custom_nodes
git clone https://github.com/playboy-dongan/ComfyUI-Logic-nodes
then restart. No extra dependencies, no model files. (The README's clone example uses a shorter repo name; the URL that actually works is the -nodes one.)
One honest caveat: ten fixed ports is more than most people need, and if you find yourself wanting a true N-way picker with fallback semantics, rgthree's Any Switch (first non-null) is a different and often better shape for "whichever branch is live, use it." The Switcher is for when you want to be the one choosing - a dial, not a fallback.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 11–10 | — |
| any1opt | * | — | |
| any2opt | * | — | |
| any3opt | * | — | |
| any4opt | * | — | |
| any5opt | * | — | |
| any6opt | * | — | |
| any7opt | * | — | |
| any8opt | * | — | |
| any9opt | * | — | |
| any10opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |