Nodes/Comfyroll Studio/πŸ”€ CR Image Input Switch
ComfyUI Node Runs on cloud

πŸ”€ CR Image Input Switch

Toggle between two image branches in ComfyUI

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
πŸ”€ CR Image Input Switch
  • image1
  • image2
  • IMAGE
  • show_help
β—„Input1β–Ί

This is one of those unglamorous nodes you end up using constantly. CR Image Input Switch takes two image inputs and passes one of them through based on a number you set - a clean A/B toggle for your graph. Want to flip between "run the upscale" and "skip it," or between two different source images, without dragging wires around every time? Set the switch to 1 or 2. Done.

It's part of the logic/utility set in Comfyroll Studio, the workflow-glue pack from Suzie1 and RockOfFire. No model, no compute - it's routing.

How it works

The Input value (1 or 2) selects which of the two optional images gets sent to the output. The unselected branch is ignored. Because both image inputs are optional, you can leave the branch you're not using disconnected - only the one you're selecting needs to actually carry an image. That makes it a tidy way to mute or reroute part of a workflow from a single widget.

The real power move: drive Input from another node instead of setting it by hand - a boolean-to-value node, a string switch, whatever - and now your graph reconfigures itself based on conditions upstream.

The inputs that matter

  • Input - an integer, 1 or 2, choosing which image passes through. This is the whole control.
  • image1 / image2 - the two optional branches. Connect one or both.

Output is IMAGE (the selected branch) plus show_help, a string that links to the node's wiki page - leave it unconnected.

Installing it

ComfyUI Manager β†’ search Comfyroll Studio β†’ install β†’ restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes

then restart. The logic nodes are dependency-light - nothing to download.

Common issues

You selected an empty branch. If Input points at a branch you never connected, there's no image to pass and the node has nothing to output. Point it at a connected input.

You expected it to run both. It doesn't blend or merge - it picks one. For combining images, that's a compositing/panel node, not a switch.

Need more than two? There's a 4-way version (CR Image Input Switch (4 way)) for choosing among four branches.

Category🧩 Comfyroll Studio/πŸ› οΈ Utils/πŸ”€ Logic

Inputs (3)

NameTypeDefaultDescription
InputINT11–2β€”
image1optIMAGEβ€”
image2optIMAGEβ€”

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
show_helpSTRINGβ€”