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

πŸ”€ CR Image Input Switch (4 way)

Pick one of four image branches

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

Same idea as the two-way switch, wider. CR Image Input Switch (4 way) takes up to four image inputs and passes exactly one through, chosen by a number from 1 to 4. It's the node you reach for when you've got several candidate branches - four different sources, four preprocessing variants, four models' outputs - and you want to select one from a single widget instead of rewiring the graph.

It belongs to the logic/utility set in Comfyroll Studio, the workflow-glue pack by Suzie1 and RockOfFire. Pure routing, no model, no GPU cost.

How it works

The Input integer (1–4) picks which of the four optional images reaches the output; the rest are ignored. All four image inputs are optional, so you only need to connect the branches you actually use - the selected one has to carry an image, the others can dangle. Point Input at a driver node (a string-to-switch, a value node) and the selection becomes conditional on something upstream, which is where these switches earn their keep in bigger graphs.

The inputs that matter

  • Input - integer 1 to 4, selecting the branch. The only real control.
  • image1 / image2 / image3 / image4 - the four optional branches.

Output is IMAGE (the chosen branch) plus show_help, a wiki-link string you can leave unconnected.

Installing it

ComfyUI Manager β†’ search Comfyroll Studio β†’ install β†’ restart. Manually:

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

then restart. Nothing to download - the logic nodes are dependency-light.

Common issues

Selected branch is empty. If Input names a slot you didn't connect, there's no image to pass. Make sure the selected branch actually has an input.

It picks, it doesn't combine. Like the two-way switch, this routes one image through - it won't merge four into a grid. For that, use CR Image Grid Panel or CR Image Panel.

Only need a straight A/B? The two-input CR Image Input Switch is the simpler node.

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

Inputs (5)

NameTypeDefaultDescription
InputINT11–4β€”
image1optIMAGEβ€”
image2optIMAGEβ€”
image3optIMAGEβ€”
image4optIMAGEβ€”

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
show_helpSTRINGβ€”