🔶 Any Switch (Big)
Route one of ten inputs through by index, reverse, or at random
- source_0
- source_1
- source_2
- source_3
- source_4
- source_5
- source_6
- source_7
- source_8
- source_9
- SOURCE_X
- Info
The README pitches this whole pack partly around "using Any-Switch to control any input at any time," and this node is the switch itself - up to ten inputs, one selector, one output. It's a different tool from the array nodes even though they solve adjacent problems: the array nodes bundle-then-unbundle a fixed set of values, while this one is a live routing switch you flip between generations.
What it does
source_0 is required and wildcard-typed (*); source_1 through source_9 are optional, same type - up to ten candidate values total, none of which need to match each other in type. nr (INT, default 0, range 0–9) picks which one passes through, and mode decides how that number gets interpreted: "nr = Source" reads it directly (nr=3 routes source_3), "nr = Revers" reads it from the other end (nr=0 routes source_9, nr=1 routes source_8, and so on), and Random ignores your nr value entirely and picks a source at random each time the node runs. Output is SOURCE_X, the selected value, plus an Info status string.
The optional nr_override (INT) does for this node what similar override inputs do elsewhere in the pack - lets something else, like the Number Counter's INT output, drive the selection dynamically instead of you clicking the widget by hand. That's the difference between "a switch you flip manually between test runs" and "a switch that cycles automatically across an animated sequence."
Why you'd reach for it
Two real use cases. One is manual A/B testing: wire in several candidate MODELs, CONDITIONINGs, or whatever else, and flip nr between runs to compare them without re-wiring anything. The other is automated cycling: drive nr_override from a counter so a workflow rotates through checkpoints, prompts, or ControlNet inputs across a batch run on its own. Random mode is worth calling out on its own - it's the one option here that isn't reproducible run to run, useful if you deliberately want variety rather than a controlled comparison, but the wrong choice if you're trying to diagnose why one particular source produced a particular result.
Installing it
Through ComfyUI Manager: search "Chaosaiart-Nodes," or "Install via Git URL" with https://github.com/chaosaiart/Chaosaiart-Nodes, then restart ComfyUI. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/chaosaiart/Chaosaiart-Nodes, restart. Linux needs pip install opencv-python and pip install tqdm (venv active first) for the pack to import without errors. Windows has a bundled Install_windows script. No model downloads.
Troubleshooting
If the wrong source comes through, double-check mode before assuming nr is set incorrectly - "nr = Revers" is an easy thing to leave on by accident after testing it, and it'll silently route from the opposite end of your list than you expect. If output changes on every run when you didn't want it to, you're most likely on Random mode rather than "nr = Source" - switch modes rather than trying to pin a random selection down with a fixed nr value, since Random ignores it. And if nr_override doesn't seem to respond, remember an override input generally wins over the static widget when connected - if you're trying to set the index by hand and it won't stick, check nothing's still wired into nr_override from earlier in the graph's history.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 3 options: nr = Source, nr = Revers, Random | |
| nr | INT | 00–9 | — |
| source_0 | * | — | |
| source_1opt | * | — | |
| source_2opt | * | — | |
| source_3opt | * | — | |
| source_4opt | * | — | |
| source_5opt | * | — | |
| source_6opt | * | — | |
| source_7opt | * | — | |
| source_8opt | * | — | |
| source_9opt | * | — | |
| nr_overrideopt | INT | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| SOURCE_X | * | — |
| Info | STRING | — |