[Legacy] Conditional Select
The old boolean branch still in old workflows
- on_true
- on_false
- 选择结果
Conditional Select is the oldest and simplest node in the Flow Branch pack: a boolean switch that picks one of two data streams and passes it through. If you load an older workflow that uses it, it still runs fine. If you're starting something new - don't. It's marked [Legacy] and hidden from the add-node menu precisely because the Flow Orchestrator replaced it, so the only way you'll meet it is opening a saved workflow from before that upgrade.
How it works
It's a lazy A/B switch. A condition boolean decides which branch is the primary: on_true when true, on_false when false. The selected branch is the only one that executes - the node's check_lazy_status asks the engine for just that input, so the unselected branch doesn't run at all. If the selected branch isn't connected, it automatically falls back to the other branch; if both are missing, it blocks with a clear "no branches connected" error rather than passing through nothing.
That "fall back when the selected branch is unconnected" behavior is the same shape as first-non-null switching - if you've used rgthree's Any Switch, the idea is familiar, just driven by a boolean instead of picking the first connected input. One output, 选择结果 ("selection result"), carries whichever branch won.
What you set
- condition (boolean, default true) - the switch. Wire it to anything producing a boolean (an Image Saver's metadata, a custom logic node) or just toggle it in the widget.
- on_true / on_false (any) - the two candidate values.
The labels and defaults lean Chinese - this pack ships English and Simplified Chinese UI, and the legacy nodes kept their original Chinese-facing text.
Why it's legacy
The orchestrator supersedes it for two reasons. First, this node only picks between two options; the orchestrator handles unlimited stages with unlimited options per stage. Second, the orchestrator gets order protection - each stage verifies it reads the correct previous result - which a bare boolean can't give you. If you inherited a workflow with a Conditional Select, leave it in place and it'll behave exactly as saved. If you're tempted to build the same pattern fresh, use the orchestrator instead.
Install
Same as the rest of the pack - flow-branch from ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/yurishk/ComfyUl-FlowBranch
then restart. No Python dependencies, no model files. One heads-up so you're not confused later: because it's hidden from the menu, you won't find it by searching the node picker. It only materializes when an old workflow asks for it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | BOOLEAN | true | — |
| on_trueopt | * | — | |
| on_falseopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 选择结果 | * | — |