Nodes/Mickmumpitz-Nodes/Execution Gate
ComfyUI Node

Execution Gate

Make one node wait until the whole graph is done

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Execution Gate
  • value
  • _check_1
  • _check_2
  • _check_3
  • _check_4
  • _check_5
  • _check_6
  • _check_7
  • _check_8
  • _check_9
  • _check_10
  • value
channeldefault

ComfyUI only runs the nodes you've wired. That's normally a feature, but it bites you in workflows with side effects: you want to save a video, or free memory, or dump a report - but only after every upstream branch has finished, even the branches nothing else depends on. Execution Gate is the pack's answer: a pass-through node that refuses to run until every check point on its channel has executed.

It's one of those "I'll never need this" nodes until the day your pipeline quietly produces a file that only captured half the frames because the save node ran before the final branch finished. This node is the guard that closes that hole.

How it works

Execution Gate has a value input (wildcard *) that it passes straight through, plus a channel string (default default). The magic is a queue-time prompt handler: at submit time, it finds every CheckOutput node in the graph sharing the same channel and injects hidden _check_N dependencies into the gate. A hidden dependency means the gate can't execute until those check outputs have run - even though you never drew a wire between them.

So the pattern is: put a CheckOutput at the end of each branch you care about (it's also a pass-through, but it's flagged OUTPUT_NODE, so it always runs when its branch is reached), give them all the same channel as your gate, and the gate waits for all of them.

There's also an ExecutionGateControl node - same channel, with an enabled boolean. Set enabled=False and the handler skips wiring, so the gate passes through immediately. That's your master on/off switch for the whole synchronization without touching the gate or the checks.

Inputs and outputs

  • value (*) - anything; it's passed through unchanged. This is what you wire into the downstream node that must wait.
  • channel (STRING) - the sync group. Match it across gate, checks, and control.
  • The hidden _check_1_check_10 slots get filled automatically - you never touch them.
  • Output: value (*).

Where it fits

The canonical use: a "save everything" or "finalize" node at the end of a multi-branch workflow (like the iterative video setups this pack is built around, where you accumulate frames across passes). Rather than trying to wire every branch into the saver and fighting type mismatches, drop a CheckOutput on each branch, gate the saver, and let the handler do the wiring. It's genuinely the cleanest way to express "run this last, no matter what."

Installing

Part of Mickmumpitz-Nodes - ComfyUI Manager → search "Mickmumpitz" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes

Light deps, no downloads.

Gotchas

Channel naming is the whole game - a gate and checks with different channels simply won't see each other, and the failure is silent. If your gate fires before it should, check every CheckOutput's channel. Also, the handler only scans the prompt at submit time: nodes added after you've already queued won't be in that submission's wiring, so re-queue if you've moved things. And remember hidden dependencies only make the gate wait - they don't move data, so keep the actual value wired normally through value.

CategoryMickmumpitz/Utils

Inputs (12)

NameTypeDefaultDescription
value*
channelSTRINGdefault
_check_1opt*
_check_2opt*
_check_3opt*
_check_4opt*
_check_5opt*
_check_6opt*
_check_7opt*
_check_8opt*
_check_9opt*
_check_10opt*

Outputs (1)

NameTypeDescription
value*