flow select
The node that routes a value AND decides what runs next
- value
- true
- false
ComfyUI has two very different kinds of "if this, then that." There are data switches, which pick a value and pass it along. And then there's flow select (Basic data handling: FlowSelect), which does something ComfyUI users keep tripping over: it controls whether downstream nodes execute at all.
Two required inputs:
- value - any value (ANY type)
- select - a BOOLEAN deciding the direction
Two outputs, both ANY:
- true - carries
valuewhenselectisTrue - false - carries
valuewhenselectisFalse
Here's the mechanism, and it's the part most people miss. When select is True, the true output passes your value along and the false output hands downstream an ExecutionBlocker. When select is False, the roles flip. An ExecutionBlocker isn't "nothing" - it tells ComfyUI don't run anything downstream of this socket. The branch you didn't pick doesn't just receive an empty value; its entire subgraph is skipped.
Why you'd use that, on purpose
This is the node for "conditionally run an expensive branch." Say you have an upscale or a detailer pass that you only want when a flag is set. Route the value through FlowSelect on the flag, and the whole downstream chain - upscaler, second sampler, the lot - simply never runs when you don't want it. Skipped nodes mean skipped compute, which is the actual payoff here, and it's something a plain data switch can't give you.
That's also where people get burned. Because the unselected branch is blocked from executing, anything on it that you expected to produce output (like a save node) just won't fire. If you wanted "send the value down one path and put a fallback on the other," that's a switch, not flow select. The node's own description flags a related subtlety: for dynamic switching inside a Data Flow, it points you to filter select instead - flow select is a static, per-run decision, not something that re-routes mid-iteration.
Installing it
This node is part of the Basic data handling pack by StableLlama. In ComfyUI Manager, search "Basic data handling", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
then restart. No dependencies, no requirements.txt, no models - pure Python.
Troubleshooting
The big one: you wired up both branches, ran it, and the branch you didn't expect to run produced nothing. That's working as intended - it was blocked. If you genuinely need both branches to produce values and just pick one, reach for a switch node instead of flow select. Also note select is a plain BOOLEAN input, so pair this with a comparison or boolean-logic node from the same pack to drive it from real conditions rather than a hardcoded widget.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | — | |
| select | BOOLEAN | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| true | * | — |
| false | * | — |