Nodes/ComfyUI-Desert-Pixel-Nodes/DP 10 Images Switch Or Batch
ComfyUI Node

DP 10 Images Switch Or Batch

Ten image slots, switch one or batch the lot

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP 10 Images Switch Or Batch
  • Image_01
  • Image_02
  • Image_03
  • Image_04
  • Image_05
  • Image_06
  • Image_07
  • Image_08
  • Image_09
  • Image_10
  • IMAGE
  • CURRENT_INDEX
modeSwitch_Mode
index1

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_Mode or Batch_Mode.
  • index - integer 1 to 10, used in Switch_Mode to select Image_01 through Image_10.
  • Image_01Image_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.txt if 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.

CategoryDP/Image

Inputs (12)

NameTypeDefaultDescription
modeCOMBOSwitch_Mode2 options: Switch_Mode, Batch_Mode
indexINT11–10
Image_01optIMAGE
Image_02optIMAGE
Image_03optIMAGE
Image_04optIMAGE
Image_05optIMAGE
Image_06optIMAGE
Image_07optIMAGE
Image_08optIMAGE
Image_09optIMAGE
Image_10optIMAGE

Outputs (2)

NameTypeDescription
IMAGEIMAGE
CURRENT_INDEXINT