ComfyUI Node

Switch

A two-image switch that prunes the losing branch — a real bypass, not a picker

By mickmumpitz·Created about a month ago·Updated about 19 hours ago· 17
Switch
  • image_a
  • image_b
  • image
selecttrue

Switch looks like the most boring node in ComfyUI-SplatKit, and it is - until you notice what makes it different from every other "pick one of these images" node you've used. It's not just selecting between two images; it's lazy, and that changes what it's for.

Here's the thing. In ComfyUI, when you wire two branches into a node, both branches normally execute. A plain image-picker computes the image you don't use and throws it away. This node's inputs are marked lazy: only the selected branch is requested from the graph, so everything feeding the other one is pruned and never computed at all. That's the difference between "discard the result" and "never do the work."

How it works

Three inputs, one output. select is a boolean - the node even labels the toggle A and B so you can read the graph at a glance. select true returns image_a; false returns image_b. Under the hood, check_lazy_status tells ComfyUI which input it actually needs, and the graph executor drops the rest. That makes it a genuine bypass: wire a processed image into A and the unprocessed original into B, flip the toggle, and you've bypassed a whole upscaling or repaint chain without deleting anything. The heavy branch simply doesn't run.

You can also wire it behind another boolean so the choice is driven by a widget elsewhere, which is how it's used in this pack's 0_generate_360_panorama-upscale.json workflow to switch between the text→pano (Krea 2 Turbo) and image→pano (Qwen-Image-Edit + 360 LoRA) generation paths.

Notes and limits

It's deliberately minimal: images only, exactly two inputs, no preview widget, no "both" mode. If you want a 3+ input image switch or switching on a non-IMAGE type, grab a general switch node (rgthree's comes to mind) - this one exists for the bypass use case and does that one thing well.

Install

It ships with the pack, so installing it is the pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-SplatKit
python_embeded\python.exe -m pip install -r ComfyUI-SplatKit/requirements.txt

Restart ComfyUI and you'll find Switch under the SplatKit category alongside the heavy SfM machinery. No model downloads, no dependencies, no gotchas - it's the one node in this pack that can't break your day.

CategorySplatKit

Inputs (3)

NameTypeDefaultDescription
selectBOOLEANtrue
image_aIMAGE
image_bIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE