Execution Blocker | akatz-loops
Stop a Branch Without Deleting It
- input
- output
Sometimes you want to keep a whole branch of your workflow in place but not have it actually do anything this run - a save step you only want on some runs, an expensive refinement you want to skip when a condition isn't met. ComfyUI's built-in answer is bypassing nodes by hand, which is manual and breaks the moment the workflow becomes dynamic. ExecutionBlocker is the data-driven version: a tiny pass-through node that, when its block flag is true, tells the engine to stop executing everything downstream of it. When false, it passes its input straight through and nothing happens.
It's a ComfyUI-native concept, not a hack - the node returns the engine's own ExecutionBlocker sentinel, which the executor understands natively as "don't run anything downstream of this." That's the elegant part: you're not deleting a branch or muting it in the UI; you're making the graph choose to skip itself based on whatever condition you wire into block. Drive that flag from a boolean comparison, a counter hitting a threshold, a toggle you converted to an input, and the branch is dead exactly when you want it dead.
The three inputs
- input - the value that flows through when not blocked. Wildcard
*, so it can be an image, a latent, a conditioning, anything. This is what the downstream branch consumes when it runs. - block - the master switch.
truehalts downstream execution;falseis a no-op pass-through. - verbose (default
false) - cosmetic, in the truest sense: whentrueand blocking, the engine logs "Blocked Execution" so you can see in the console that the block fired. Leave it off unless you're debugging.
The single output, output, is just the input echoed back when unblocked. This is a fork node, not an endpoint - you wire the input from the branch you might want to skip, and the output into the first node of that branch.
Where it shines
The classic ComfyUI pattern this replaces is the "keep two branches, flip between them" hack of bypassing nodes manually. With ExecutionBlocker wired into a loop or a conditional, a workflow can skip an optional face-fix pass, a second upscale, or a save-and-tag step based on data - which is the whole difference between "a workflow I manually toggle" and "a workflow that decides for itself." It also composes with this pack's loop nodes: block a heavy branch on early iterations and only run it on the final pass.
Install
Part of Akatz-Loop-Nodes (akatz-ai). Via ComfyUI Manager, search "Akatz-Loop-Nodes"; or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Loop-Nodes
Restart ComfyUI. The pack's only dependency is opencv-python (used by its image nodes, not this one), and there are no model downloads. The custom_nodes.ComfyUI-Execution-Inversion module path on listings is lineage from BadCafeCode's execution-inversion demo - not a package you install.
One thing people trip on: a blocked branch's upstream still runs - the blocker only stops what's downstream of it. If you're trying to save VRAM by skipping a heavy sampler, make sure the blocker sits upstream of that sampler, not after it. And don't confuse block with the node's state; an unblocked ExecutionBlocker is invisible in every way, which is exactly what you want.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input | * | — | |
| block | BOOLEAN | — | |
| verbose | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |