Image Muxer
Pick one of up to four images by a number
- image_1
- image_2
- image_3
- image_4
- IMAGE
A mux, in the electronics sense, picks one of several inputs based on a selector signal. This node does exactly that for images: wire in up to four, feed it an index, and it passes through whichever one that index points to. It's the node you reach for when "which image continues down the pipeline" should be a value - driven by JSON data, an API parameter, or logic elsewhere in the graph - rather than something you decide by physically replugging wires every time.
How it works
You connect two to four images. input_selector is an integer that picks which one gets passed through as the output - 0 for the first, 1 for the second, and so on up to whichever inputs you've actually wired. Everything else is discarded for that run; nothing gets blended or combined, this is a pure switch, not a mixer despite the name's electronics pun.
The inputs and outputs that matter
Required:
image_1/image_2- the first two options, always present.input_selector(default0) - the index choosing which image passes through.
Optional:
image_3/image_4- extend the selector's range up to four options total. Leave unwired if you only need two.
One output: IMAGE - whichever input the selector picked.
How to install it
Part of the Art Venture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
Restart ComfyUI. No model downloads.
Common issues & troubleshooting
Selector index doesn't seem to point where I expect. Indexing starts at 0, not 1 - input_selector = 0 picks image_1, 1 picks image_2, and so on. If you're driving the selector from a JSON field or an external caller, make sure whatever's producing that number is zero-indexed too, or off-by-one errors will quietly select the wrong branch.
Selector value points past the images I actually wired. If you only connected image_1 and image_2 but the selector can go to 2 or 3 (say, driven by a variable upstream rather than hand-typed), you're pointing at an unconnected optional input. Either clamp the selector's range upstream (NumberScaler or a min/max node) or wire all four image inputs so any valid selector value has something to return.
Want to blend the images instead of picking one. Wrong node for that - this is a hard switch, not a mix. For an actual blend, look at ColorBlend (for the luminance/color split) or ImageAlphaComposite (for a transparency-driven overlay), depending on what kind of combination you're after.
Driving the selector from data but it never changes. Confirm the selector is actually wired to an input, not left on its static default widget. If input_selector is just sitting at its default 0 with nothing feeding it, you'll always get image_1 regardless of what you intended to drive it with.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image_1 | IMAGE | — | |
| image_2 | IMAGE | — | |
| input_selector | INT | 0 | — |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |