Branch Gate (skip upscaler when off)
Turn an expensive branch off without re-running it
- images
- images
You know that branch of your workflow - the upscaler, the detail pass, the second sampler - that costs real time but isn't always wanted? CCC_BranchGate is a switch for it, and the clever part is how it turns off. When disabled, it returns an ExecutionBlocker instead of images, which means the downstream upscaler isn't run-and-discarded: it's never executed at all. The work simply doesn't happen. That's the difference between this and the usual bypass approach, and it's the whole point.
The node's own description says exactly how to use it: put it on the upscaler's input and drive enabled from the same boolean as your output switch. One toggle then flips both which result you keep and whether the expensive path runs.
How it works
Two inputs, both worth understanding:
images- the images that would feed the expensive branch.enabled- the master switch. WhenTrue, images pass through untouched (it's a transparent pass-through). WhenFalse, it emits an ExecutionBlocker.
An ExecutionBlocker is ComfyUI's signal that a node has decided to abort its subtree. Anything downstream of a blocker gets skipped entirely rather than executed and thrown away. So if your graph is images → CCC_BranchGate → upscale → switch → output, flipping the gate off means the upscale never runs and the switch just routes the un-upscaled images out. For a SeedVR2 or SUPIR pass that can be minutes of VRAM, that's a real saving - and it keeps VRAM free, because the model never even loads.
Where it fits
The CCC framing puts it at the end of the dataset loop, but honestly it's a general utility. The canonical pattern is a quality toggle: "upscale for the portfolio version, skip for the quick drafts." Same boolean drives your output selector and the gate, and you never burn time on a pass whose result you won't use.
The subtle bit is trusting it. Because a blocker cuts execution, downstream nodes won't run - so make sure everything that needs to run in the skipped case is wired to the un-gated path. If something downstream of the gate still needs the upscaled images even when "off," this node isn't the right tool; the off case must genuinely not need the branch.
Installing it
Part of Mickmumpitz-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git
or ComfyUI Manager → search "Mickmumpitz" → install → restart. No downloads, no heavy deps - numpy, Pillow, opencv-python at most.
Troubleshooting
- Everything downstream went gray - that's the blocker working as designed. Your off-path wiring is missing; route the un-gated images around the branch.
- Gate "off" but branch still runs - check you put the gate on the input of the expensive node, not somewhere the execution still flows around it. A blocker only stops nodes wired downstream of it.
- Switch flapping between outputs - make sure
enabledon the gate and the boolean driving your output switch are literally the same value, or you'll ask for the upscaled output while the gate blocks the upscaler.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| enabled | BOOLEAN | true | When False, blocks this branch so the downstream upscaler is skipped entirely (not run-and-discarded). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |