[Legacy] Stage Switch
Turn one processing step on or off, with graceful pass-through
- processed
- source
- 阶段结果
Stage Switch is the single-step predecessor of the Flow Orchestrator's stage: one boolean toggle that decides whether a processing chain runs or the previous result just passes straight through. It's [Legacy] and hidden from the add-node menu, so realistically you meet it when you open an old workflow. It still behaves exactly as saved - and for new workflows, the Flow Orchestrator absorbed this job and does it with far more control.
How it works
The shape is simple: an input_channel and output_channel pair of names (defaults 上一阶段/"previous stage" and 本阶段/"this stage"), an enabled boolean, and two data inputs - processed (your processing chain's output) and source (the previous stage's result, for pass-through).
When enabled is on and processed is connected, you get the processed result, published under the output channel. When the stage is disabled, or enabled but processed isn't connected, it hands you source instead - the previous stage passes through and gets published under the output name. The node is lazy, so it only requests the input it actually needs this run; a disabled stage never pulls its processing chain, which means a bypassed face-fix or upscaler doesn't execute at all. If there's no processed to use and no source to fall back on, it blocks with a clear error rather than emitting nothing.
That enabled/disabled + pass-through pattern is exactly the per-stage behavior the orchestrator formalized - its README table maps one-to-one onto this node's logic (disable a stage → run none of its options, pass the previous result through). This is the primitive it grew from.
What you set
- enabled (boolean, default true; labels 启用/"enable", 旁路/"bypass") - the master switch.
- processed (any) - wire your processing chain's output here.
- source (any) - the previous stage's result for pass-through.
The output, 阶段结果 ("stage result"), is whichever value won, already published under the output channel name. As with the other legacy nodes, the labels lean Chinese - the pack ships both English and Simplified Chinese, and these kept their original text.
Why it's legacy
One stage, one on/off, no alternatives, no validation that your processing chain read the correct previous result. The orchestrator replaced it with unlimited stages, multiple options per stage, auto-selection, and compile-time order checks. If you load a workflow with a Stage Switch in it, leave it alone and it runs as written. Building fresh - use the orchestrator.
Install
The pack installs like the rest of Flow Branch: 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. Don't bother searching the node picker for it - it's hidden from the menu and only materializes when a saved workflow asks for it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_channel | STRING | 上一阶段 | 上一步成功结果的通道。 |
| output_channel | STRING | 本阶段 | 本阶段结果发布到这个通道。 |
| enabled | BOOLEAN | true | — |
| processedopt | * | — | |
| sourceopt | * | — | |
| compile_erroropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 阶段结果 | * | — |