π CR Image Input Switch (4 way)
Pick one of four image branches
- image1
- image2
- image3
- image4
- IMAGE
- show_help
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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | INT | 11β4 | β |
| image1opt | IMAGE | β | |
| image2opt | IMAGE | β | |
| image3opt | IMAGE | β | |
| image4opt | IMAGE | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| show_help | STRING | β |