DP 10 Images Switch Or Batch
Ten image slots, switch one or batch the lot
- Image_01
- Image_02
- Image_03
- Image_04
- Image_05
- Image_06
- Image_07
- Image_08
- Image_09
- Image_10
- IMAGE
- CURRENT_INDEX
The big one in the Desert Pixel image-switch family. Ten image inputs, and the same two behaviors as its smaller siblings: route a single image through by index (switch), or fold all the connected images into one batch (batch). Ten slots is for when you're genuinely handling a lot of images at once - a set of reference frames, a spread of candidates, or a grid you want to reassemble.
It's from DesertPixelAi's Desert-Pixel-Nodes, a large quality-of-life pack. Nothing in it generates images; it's plumbing, in the same family as rgthree's utilities. This node's whole job is keeping a ten-image fan-in from turning into spaghetti.
How it works
mode picks the behavior, index picks the image in switch mode:
- Switch_Mode - output only the image at
index, ignoring the rest. - Batch_Mode - combine every connected image into a single batch and pass it on.
The ten image inputs are all optional, so you connect only the ones you need and leave the rest empty. In Batch_Mode it batches whatever's wired up, however many that is.
The practical question is which mode you want. Reach for Switch_Mode when the ten images are alternatives and you want exactly one to continue - picking a hero frame from ten candidates, or A/B/C-ing through variations on a fixed seed. Reach for Batch_Mode when the ten images belong together and the next stage should process them as a set - a strip you're about to upscale, a group headed for a video assembler, or frames you'll save as a sequence.
The inputs and outputs that matter
mode-Switch_ModeorBatch_Mode.index- integer 1 to 10, used in Switch_Mode to selectImage_01throughImage_10.Image_01…Image_10- ten optional IMAGE inputs.
Outputs: IMAGE (selected image or batch) and CURRENT_INDEX (integer). With ten inputs, that index output is worth wiring to a display - drive index from a counter and you've got a ten-way image selector that reports which frame it's showing.
How to install it
- ComfyUI Manager: search "Desert Pixel", install, restart. Nothing to download.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes,pip install -r requirements.txtif present, restart.
All the pack's nodes are under the DP category.
Common issues
Batch_Mode is where size mismatches bite, and with ten inputs you're more likely to have a stray one that doesn't match. ComfyUI batches want identical dimensions; if batching errors, resize all your inputs to a common size first. This is the single most common problem with any multi-image batch node, not something specific to this one.
In Switch_Mode, index aimed at an unconnected slot outputs nothing - an easy mistake when only a few of the ten are wired. If downstream goes empty, check the index. And in Batch_Mode index is ignored completely; every connected image is included.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | Switch_Mode | 2 options: Switch_Mode, Batch_Mode |
| index | INT | 11–10 | — |
| Image_01opt | IMAGE | — | |
| Image_02opt | IMAGE | — | |
| Image_03opt | IMAGE | — | |
| Image_04opt | IMAGE | — | |
| Image_05opt | IMAGE | — | |
| Image_06opt | IMAGE | — | |
| Image_07opt | IMAGE | — | |
| Image_08opt | IMAGE | — | |
| Image_09opt | IMAGE | — | |
| Image_10opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| CURRENT_INDEX | INT | — |