ComfyUI Node

Stage Switch

Toggle a pipeline stage on and off — and actually skip the work

By mickmumpitz·Created 8 months ago·Updated 18 days ago· 48
Stage Switch
  • on_image
  • off_image
  • image
enabledtrue

Pano workflows get long, and long workflows get toggle-itis. You've built a six-stage pipeline - warp, outpaint, seam roll, harmonize, second fill pass, seam roll back - and now you want to turn the harmonize pass off to compare, without deleting a branch of the graph. Stage Switch is the clean way to do that, and it does it better than the obvious alternative.

The trick: real pruning, not hiding

A naive bypass node would just pass one of two images through, but the disabled branch would still compute - the sampler would run, fill your VRAM, and waste a minute before being discarded. That's not a toggle, that's a mute button that only works after the song is over.

This node is different. Its two image inputs are marked lazy: it tells ComfyUI which one it actually needs before the graph executes, and the unselected branch is pruned - those nodes never run at all. Flip the toggle off and the seam-roll-and-inpaint stage genuinely doesn't happen. That's real deactivation, not just hidden output.

How to wire it

  • enabled - the toggle (labeled "STAGE ON" / "STAGE OFF (bypass)").
  • on_image - wire the stage's output here. When enabled, downstream gets the processed result.
  • off_image - wire the stage's input (the pre-stage image) here. When disabled, downstream gets the original, untouched.

So the graph reads: ... → stage input → your stage → on_image and stage input → off_image, and the switch picks. Output is a single image.

Where it shines in pano work

The classic use is A/B-ing a cleanup stage. Keep Harmonize Boundary behind a switch and you can compare "harmonized vs. not" at the click of a toggle, with the disabled branch costing you nothing. It's also handy for the seam pass - flip the whole roll-and-inpaint stage off to check the raw outpaint. Because the pruning is lazy, you can stack several of these without paying for all the paths.

Install

It's part of Mickmumpitz-Nodes (MIT, deps: numpy, Pillow, opencv-python - no models). ComfyUI Manager, search "Mickmumpitz", or:

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

Restart, and it's under Mickmumpitz/Panorama as "Stage Switch". One honest note: if you're toggling whole clusters of unrelated nodes, the established ecosystem answer is rgthree's Fast Groups Muter. This node is for the specific, common case of one stage in one pipeline - and it's lighter for it.

CategoryMickmumpitz/Panorama

Inputs (3)

NameTypeDefaultDescription
enabledBOOLEANtrue
on_imageIMAGE
off_imageIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE