ComfyUI Node

ImageSwitch

A two-way image swap, with a naming twist

By taabata·Created 3 years ago·Updated 2 years ago· 259
ImageSwitch
  • image_1
  • image_2
  • IMAGE
  • IMAGE
switch

ImageSwitch is a two-input image switch: it takes two images and either passes them through or swaps them, depending on a dropdown. It's the kind of plumbing node that shows up in this pack's later workflow JSONs when the author wanted to flip between two source images without rewiring the graph - e.g. choosing which image feeds a generation node on a given run.

The inputs and the twist

  • image_1, image_2 - the two IMAGE inputs.
  • switch - a dropdown with exactly two choices: enable and disable.

Two IMAGE outputs.

Here's the naming trap, straight from the source: enable means swap. When switch is disable, the node passes image_1 → output 1 and image_2 → output 2. When switch is enable, it swaps them - image_1 becomes output 2 and vice versa. So "enable" isn't "enable the pass-through," it's "enable the swap." Read it that way and the node behaves exactly as you'd expect; assume the opposite and you'll spend a run wondering why your inputs flipped.

How it's meant to be used

As an A/B toggle: wire your two candidate images in, run once with disable, run again with enable, and compare the downstream result. Since it just reorders, you can also use it as a manual multiplexer feeding into any generation node in the pack. There's no branching logic, no conditions, no automation - it's a manual switch, full stop.

Setup

Part of taabata/LCM_Inpaint-Outpaint_Comfy, so:

cd ComfyUI/custom_nodes
git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
cd LCM_Inpaint-Outpaint_Comfy
pip install -r requirements.txt

Or ComfyUI Manager, search LCM_Inpaint-Outpaint_Comfy. No models needed.

Should you bother?

Only if you're already using this pack. It's a very thin wrapper, and the "enable = swap" semantics are the kind of thing that reads as a mistake until you check the code. Modern switch nodes in general-purpose packs (rgthree-style reroutes, primitive switches) do the same job with clearer names. This one's fine in the pack's blender workflows, but you wouldn't install the pack for it - and if a workflow loads it unexpectedly, now you know what the dropdown actually means.

Categoryimage

Inputs (3)

NameTypeDefaultDescription
image_1IMAGE
image_2IMAGE
switchCOMBO2 options: enable, disable

Outputs (2)

NameTypeDescription
IMAGEIMAGE
IMAGEIMAGE