flow_switch_output
Send one value to one of five destinations
- any_input
- output_1
- output_2
- output_3
- output_4
- output_5
The mirror of flow_switch_input, also in this pack: one wildcard-typed value in, five possible destinations out, and an index deciding which one actually receives it. Where flow_switch_input is for collapsing several candidates down to one, this is for spreading one value out to whichever of several downstream branches should get it this run.
How it works
any_input takes anything - image, latent, string, whatever your graph is passing around - and index (1 through 5) picks which of output_1 through output_5 it comes out on. The four outputs that don't match index presumably receive nothing that pass, which is the useful part: it means only the branch you actually selected executes downstream, the rest just sit idle. That makes this a genuine router, not a five-way duplicator - if you wanted the same value going to all five destinations at once, this isn't the node for it; you'd want plain reroutes instead.
Inputs and output
- any_input (required, wildcard) - the value being routed.
- index (INT, default 1, range 1–5) - which output receives it.
- output_1–output_5 (outputs, wildcard) - the five possible destinations.
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" - a Windows-first instruction, 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 a downstream node isn't receiving anything, double-check index - it's a 1-based number, so if you're thinking in 0-based terms out of habit (easy to do coming from most programming languages), you'll consistently be one output off from where you expect.
Since output_1–output_5 are all wildcard-typed, ComfyUI won't warn you if you route any_input toward an output whose downstream node expects a different data type than what you're actually sending - that only shows up when the graph runs, not when you wire it.
index tops out at 5. If your workflow needs more than five destinations for the same value, you'll need to chain this with another switch node or restructure around it.
And the pack-wide caveat: this is one node inside a large, actively developed package, and an import failure elsewhere in the pack can take this node down too. If it's missing after install, check the ComfyUI console at boot for the real traceback.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| any_input | * | — | |
| index | INT | 11–5 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| output_1 | * | — |
| output_2 | * | — |
| output_3 | * | — |
| output_4 | * | — |
| output_5 | * | — |