Nodes/Flow Branch/Flow Orchestrator
ComfyUI Node

Flow Orchestrator

Run a multi-stage pipeline and let it pick the path

By yurishk·Created about a month ago·Updated about a month ago· 1
Flow Orchestrator
  • source
  • pipeline_result
  • selected_value
  • pipeline_result
input_channelOriginal Image
output_channelFinal Image
pipeline_config{"version":2,"stages":[]}
compile_error
stage_name
selected_name
__stage_internalfalse
__flow_generatedfalse

Flow Orchestrator is the flagship of the Flow Branch pack, and it's aimed squarely at the workflow shape everyone builds eventually: generate an image, maybe run face restoration, then send it through one of several upscalers - and you'd like to flip which path runs without rewiring anything or hand-bypassing a dozen nodes.

The classic way to build that is a pile of bypass groups and A/B switches, all of which you have to touch by hand and all of which leave dead branches that still execute. The orchestrator's answer: a single node that holds an ordered list of stages, each stage holding an unlimited number of alternative options. Only the one option you select (or the one the node auto-selects) actually becomes an execution dependency. Everything else is skipped, not run-and-discarded.

How it works

You give the node a starting result name (input_channel, default "Original Image") and a final result name (output_channel, default "Final Image"). In the node's editor you add stages, name each one's result, and add options per stage. Each option is a branch you wire up - and this is the part that makes it coherent - a stage's option must begin with a Read Result node pulling the exact name of the previous stage. That's the order protection, and it's the best feature here. If an upscaling option reads "Original Image" when the previous stage produced "Face Restored", the compiler stops that path with a clear error instead of silently skipping the face fix and upscaling an unfixed image. No more "why is my output blurry" because a branch quietly bypassed a stage.

Each stage behaves like this (from the README's table, and it's worth internalizing):

  • Disabled → runs none of its options, passes the previous result through.
  • Bypass this stage → enabled but does nothing this run, passes through.
  • Selected option unconnected → passes through with a warning.
  • Auto-select available option → picks the first connected, non-bypassed option top to bottom; passes through if none qualify.

Manual mode is radio buttons per option; auto mode is the set-and-forget. Either way, only the winning option's chain executes.

Everything - stages, options, order, switches, selections - is stored as JSON in the node's pipeline_config widget, so it survives save, reload, workflow switch, and node duplication. At queue time the frontend compiler resolves every Read Result to its publisher and mints real lazy-execution dependencies for just the selected path. No Python global state, no reliance on node placement, and it doesn't reserialize the workflow or touch other nodes' seeds.

The inputs that matter

  • input_channel - the result name the first stage reads.
  • output_channel - the result name published when the pipeline finishes.
  • pipeline_config - the JSON blob holding your stage definitions. You edit it through the node's UI, not by hand.

The single output, pipeline_result, gives you the final data directly - or you can skip the wire and read the final published name with a Read Result anywhere else. The internal inputs (source, selected_value, stage_name, the underscore-prefixed flags) are plumbing the editor wires between generated stage nodes; you won't touch them.

Install and gotchas

Install flow-branch from ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/yurishk/ComfyUl-FlowBranch

then restart. Zero Python dependencies, no models. The gotchas are naming-related, all of them: result names must be unique (duplicate publishers are a compile error), reads with no publisher and no fallback are dropped like unconnected optionals, and if you control auto options with group bypass (Ctrl+B), keep each option's final Publish Result inside the same group so the auto-selector correctly sees the option as unavailable. Right-click the orchestrator for Create Result Reader, which spawns a read node for any stage or the final result - it's the fast way to wire a stage's output onward.

CategoryFlow Branch

Inputs (11)

NameTypeDefaultDescription
input_channelSTRINGOriginal ImageResult name read by the first stage.
output_channelSTRINGFinal ImageResult name published when the pipeline finishes.
pipeline_configSTRING{"version":2,"stages":[]}
sourceopt*
pipeline_resultopt*
selected_valueopt*
compile_erroroptSTRING
stage_nameoptSTRING
selected_nameoptSTRING
__stage_internaloptBOOLEANfalse
__flow_generatedoptBOOLEANfalse

Outputs (1)

NameTypeDescription
pipeline_result*