Image Switch (JPS)
A 5-to-1 switch for picking which image feeds your graph
- img_1
- img_2
- img_3
- img_4
- img_5
- img_out
Five optional image inputs, one integer selector, one image output - whichever numbered input select points at is what passes through as img_out. It's the image version of the same "5 to 1" switch pattern this pack repeats for VAEs, integers, and IP-Adapters: instead of rewiring your graph every time you want to swap which image is actually feeding a workflow, you flip one number.
Where this actually gets used in this pack
This is the node the pack's own ControlNet Settings nodes are quietly built to drive. CtrlNet OpenPose/CannyEdge/MiDaS Settings (JPS) each have a _from selector - "Source Image", "Support Image", "Support Direct" - and their companion Pipe nodes output that choice as a plain integer rather than the label text. That's exactly the shape select on this node expects. Wire your candidate reference images into img_1/img_2/etc., feed one of those _source outputs into select, and a single settings menu upstream now decides which image actually becomes your ControlNet source, no rewiring required when you change your mind mid-session.
It's just as useful on its own, outside that specific pairing - anywhere you're testing a workflow against a few candidate input images (different angles of the same subject, a few crops, a couple of style references) and want to flip between them from one control point instead of re-plugging cables.
How it works
select is 1-indexed against the five numbered inputs - 1 picks img_1, 5 picks img_5. You don't need to wire all five; leave unused slots empty and point select only at branches that are actually connected.
How it compares to the pack's other switches
Structurally identical to Integer Switch, VAE Switch, and IPA Switch - same five-slot, 1-indexed select pattern, just typed for IMAGE instead. If you've used any one of them, you already know this one. The only thing distinct about the image variant is how often it ends up downstream of one of this pack's own Settings nodes rather than standing alone, since the ControlNet Settings family was clearly built with exactly this switch in mind for its source-image selection.
Installing it
ComfyUI Manager: search JPS Custom Nodes for ComfyUI. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
Restart ComfyUI. Delete an existing older install of the pack before cloning a fresh one - the README calls this out directly. No models involved; this node just routes image tensors, nothing gets downloaded.
Where people get tripped up
The usual mistake: select pointing at a slot nothing's plugged into. It won't error loudly, it'll just quietly produce nothing useful, which is a confusing failure mode in a large graph where it's not obvious at a glance which of the five slots are actually wired. If you're driving select from one of this pack's ControlNet _source outputs, double-check the numbering lines up - the Settings node's dropdown order ("Source Image", "Support Image", "Support Direct") corresponds to the integer values it emits, so img_1 should be your actual source image and img_2 your support image if you want the mapping to make intuitive sense later.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | — | |
| img_1opt | IMAGE | — | |
| img_2opt | IMAGE | — | |
| img_3opt | IMAGE | — | |
| img_4opt | IMAGE | — | |
| img_5opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| img_out | IMAGE | — |