Nodes/😸 YFG Comical Nodes/🐯 YFG 3 Image Switcher
ComfyUI Node

🐯 YFG 3 Image Switcher

A 3-way image switch with a routing diagram, so you can see what you picked

By gonzaluΒ·Created 2 years agoΒ·Updated a day agoΒ· 29
🐯 YFG 3 Image Switcher
  • Image 1
  • Image 2
  • Image 3
  • Selected Image
  • Connection Diagram
β—„selected_imageImage 1β–Ί
β—„font_sizeMediumβ–Ί
β—„font_colorWhiteβ–Ί
β—„font_fileseguisb.ttfβ–Ί
β—„image_labeltrueβ–Ί
β—„previewtrueβ–Ί
β—„preview_typeInput Imageβ–Ί

Any switcher is just a multiplexer: a few inputs, one dropdown, one output that echoes whichever input you selected. ComfyUI's built-in version does that, so why would you bother with this one? Two reasons. First, every input is optional, so a switcher with only one or two of its three slots wired up still works - no red "missing input" errors. Second, it can draw you a routing diagram, a little graphic that shows exactly which of the three sources is flowing to the output. When you're juggling seeds across a grid or flipping between three sampler outputs, that beats squinting at widget labels.

It's part of the YFG Comical pack (gonzalu/ComfyUI_YFG_Comical), which ships the same switcher in 3, 5, 10, 15, and 20 input variants. This is the smallest one.

How it works

The selected_image dropdown lists "Image 1" through "Image 3" and the node passes through the matching IMAGE tensor. Nothing clever. The clever bit is preview_type, which has two options:

  • Input Image - the node's preview shows the image you selected (with a label baked on if image_label is on).
  • Connection Diagram - the preview becomes a generated routing diagram: a rectangle per input, with a line from the selected one to the output. This is the "which one is live" view.

preview turns the whole preview off if you want a small, boring node. font_size, font_color, font_file only affect the label and are cosmetic.

Outputs

Two IMAGE outputs, always both produced:

  • Selected Image - the tensor you picked. This is the one you wire onward (into a VAE decode, an upscale, whatever).
  • Connection Diagram - the routing graphic. You almost never need to wire this anywhere, but it's handy to feed into a SaveImage if you're building a batch of workflow screenshots.

Installing

Install the pack once and every node in it appears - search "YFG Comical" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical

Restart ComfyUI. The switchers themselves are pure PIL, no extra dependencies. (The pack as a whole wants cv2/matplotlib for its histogram and mask nodes, so if the whole pack fails to load, pip install opencv-python matplotlib.)

The honest take

For a plain three-input swap, ComfyUI's built-in Image Switch is fine and has zero install cost. This one earns its place when you're doing seed farming or parameter sweeps and want the "which input is live" answer at a glance, or when you're building workflows other people will load and don't want missing-input errors scaring them off. If you never hit those two situations, you don't need it. If you've got a switcher-heavy workflow, having the diagram is genuinely nice.

Category🐯 YFG/πŸ”€ Switchers

Inputs (10)

NameTypeDefaultDescription
selected_imageCOMBOImage 13 options: Image 1, Image 2, Image 3
font_sizeCOMBOMedium3 options: Small, Medium, Large
font_colorCOMBOWhite8 options: White, Black, Red, Green, Blue, Yellow, +2
font_fileSTRINGseguisb.ttfβ€”
image_labelBOOLEANtrueβ€”
previewBOOLEANtrueβ€”
preview_typeCOMBOInput Image2 options: Input Image, Connection Diagram
Image 1optIMAGEβ€”
Image 2optIMAGEβ€”
Image 3optIMAGEβ€”

Outputs (2)

NameTypeDescription
Selected ImageIMAGEβ€”
Connection DiagramIMAGEβ€”