Nodes/ComfyUI-Flow-Control/Flow - Image Condition
ComfyUI Node

Flow - Image Condition

One image, up to nine conditional copies

By krich-cto·Created 2 years ago·Updated 2 years ago· 1
Flow - Image Condition
  • image
  • gate_1
  • gate_2
  • gate_3
  • gate_4
  • gate_5
  • gate_6
  • gate_7
  • gate_8
  • gate_9
gates

This is where a Flow graph splits. FlowImageCondition takes one image, and a string of gate names from a FlowGate, and fans the image out to as many outputs as there are gates - then the pack's flow logic decides which of those outputs' branches actually run. It's the image version of the beginning-condition idea, paired with FlowImageAutoBatch at the other end.

The name is a bit of a lie, by the way. It doesn't "condition" anything the way ControlNet or conditioning does. It's a gate-fanout: one image in, copies out, with the open/closed decision made elsewhere.

How it works

Inputs are image and gates (a STRING that must be wired, not typed - it's forceInput, so the field only accepts a connection, which is what keeps you honest about hooking a FlowGate up). The node splits the gate string on commas and returns one copy of the image per gate value, on gate_1 through gate_9.

The frontend does the ergonomics: when a FlowGate connects, this node's outputs are renamed to your gate names and its size matches the number of gates. The dropdown or toggles that decide which gate is open also live here, added by the gate's frontend code.

At execution, the pack's patched prompt validation reads the open gate(s), then deletes every node downstream of the closed outputs - recursively. So a five-gate workflow only executes the one (or several, in Multiple mode) branches you selected.

The inputs that matter

  • image - the single image to fan out (usually the output of a VAE Decode, or a Load Image).
  • gates - the comma-joined gate string from FlowGate. Connect, don't type.

Outputs: gate_1gate_9, each a copy of the input image, renamed to match your gate names. Wire each into a distinct post-processing path.

Install

Part of ComfyUI-Flow-Control:

cd ComfyUI/custom_nodes
git clone https://github.com/krich-cto/ComfyUI-Flow-Control

Restart ComfyUI, or Manager → "ComfyUI-Flow-Control".

Gotchas

The pruning is the whole point and the whole risk: closed branches are deleted from the executed prompt, so a wrongly-set gate silently strips half your workflow instead of complaining. The number of outputs is driven by the gate string - an empty gates input yields zero outputs, which is why the gate connection matters. And remember the outputs are all the same image; any per-branch differences have to come from the nodes downstream. If you want to swap whole pipelines by image, this is the splitter; if you want to merge them back, FlowImageAutoBatch is the join.

CategoryFlow/begin-conditions

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
gatesSTRING

Outputs (9)

NameTypeDescription
gate_1IMAGE
gate_2IMAGE
gate_3IMAGE
gate_4IMAGE
gate_5IMAGE
gate_6IMAGE
gate_7IMAGE
gate_8IMAGE
gate_9IMAGE