flow_switch_input
A 5-way multiplexer for any wire type
- in1
- in2
- in3
- in4
- in5
- out
Five wildcard-typed inputs, one output, and a number picking which one wins - that's flow_switch_input. It's the node for "I've got several candidate values and I only want one of them going downstream at a time," which comes up constantly once a workflow grows past a couple of loaders or a couple of style presets you're comparing.
How it works
Wire up to five values into in1 through in5 - anything, since they're all *-typed - and input_index (1 through 5) picks which one gets forwarded to out. The other input_method boolean isn't explained anywhere in the pack's own docs; going by the name, it most likely toggles between manually picking the index (what input_index does) and some automatic mode - for instance, auto-selecting whichever input actually has something connected. That's a reasonable guess given the pattern shows up in other ComfyUI switch nodes, but it isn't confirmed here, so treat it as something to test rather than assume.
Pair this with flow_switch_output, also in this pack, and you've got a matched multiplexer/demultiplexer set - one collapses several sources down to one, the other spreads one source out to several destinations.
Inputs and output
- input_method (BOOLEAN, default true) - undocumented; likely toggles manual vs. automatic input selection.
- input_index (INT, default 1, range 1–5) - which input gets forwarded, in manual mode.
- in1–in5 (optional, wildcard) - the candidate values.
- out (output, wildcard) - whichever one was selected.
Installing it
Search ComfyUI-Apt_Preset in ComfyUI Manager and install, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The README's own dependency step is "double-click install.bat" - Windows-first, with no requirements.txt visible elsewhere, so on Linux/Mac open that file to see what it installs and mirror it manually in your ComfyUI venv. This node is pure control flow and needs none of the pack's optional extras (GGUF, Advanced-ControlNet, nunchaku, downloaded models).
Common issues
If out isn't giving you what you expect, check input_method first - since its exact effect isn't documented, it's easy to have it in the "wrong" mode for what you're trying to do (manual index selection vs. whatever the automatic behavior turns out to be).
All five input sockets are wildcard-typed, so nothing stops you from wiring five completely different data types into in1–in5 - that's fine as long as whatever's downstream of out can actually handle whichever one gets selected, but it won't be caught until the graph runs.
input_index only goes up to 5 - if you need to pick from more than five candidates, you'll need to chain two of these together or restructure with something else in the pack.
And the pack-wide caveat: this is one node in a large, actively developed package, and an import error elsewhere can take this node down too. If it's missing after install, check the ComfyUI console at boot for the real traceback.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| input_method | BOOLEAN | true | — |
| input_index | INT | 11–5 | — |
| in1opt | * | — | |
| in2opt | * | — | |
| in3opt | * | — | |
| in4opt | * | — | |
| in5opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| out | * | — |