ComfyUI Node

SplitImages

Un-batching the cloud API's batch output, four at a time

By BetaDoggo·Created 2 years ago·Updated 6 months ago· 38
SplitImages
  • images
  • IMAGE
  • IMAGE
  • IMAGE
  • IMAGE

SplitImages exists because of a small design mismatch inside this pack. The Flux generation nodes let you set image_count up to 4, and they return all the results as one batched IMAGE tensor. But the image-to-image nodes take a single image, and lots of ComfyUI utility nodes do too. SplitImages is the bridge: it takes a batched IMAGE, splits it into up to four separate IMAGE outputs, and pads any empty slots with a placeholder. No API calls, no key, no cost - it's the pack's plumbing.

The placeholder part is worth understanding, because it's unusual. If your batch has only 2 images, the node still outputs 4 IMAGE outputs - the two empty ones get a solid placeholder image the author included as none.png. It's an explicit "nothing here" signal rather than a null value, which keeps the graph wired up without dangling sockets. Downstream nodes that receive the placeholder just see an image, so be aware that a black output isn't necessarily a bug - it's an empty slot.

How it works

Straightforward: iterate the input batch, unsqueeze each image into its own output, and if there are fewer than 4, pad with the placeholder. The four outputs correspond to the four slots, in order. Feed it the batched output of FalFluxAPI, FalFluxI2IAPI, or FalFluxLoraAPI and you can route each result to its own destination - save them separately, compare them, or feed one into an i2i node.

The inputs that matter

There's exactly one input and no knobs:

  • images - a batched IMAGE tensor, typically from a cloud generation node with image_count > 1.

Four IMAGE outputs, labelled in order. That's the entire node.

Install

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/BetaDoggo/ComfyUI-Cloud-APIs

or Manager → search "ComfyUI-Cloud-APIs", restart. No key, no setup, nothing to configure.

Troubleshooting

  • I see a black/blank image in one output - that's the empty-slot placeholder, not a generation failure. It means your batch had fewer than 4 images.
  • Only 2 images came back but I asked for 4 - some cloud endpoints return fewer results than requested under certain conditions, or the node's image_count was set lower. Check the generation node's setting.
  • Outputs are out of order - they're not; slot order is preserved. If it looks shuffled, double-check which output you wired where.
  • Can I un-batch more than 4? No. The node hardcodes four slots. For bigger batches you'd want a different utility.

As a pure local utility, SplitImages is one of the more durable nodes in this otherwise-archived pack - nothing external to rot. It's the part of the cloud story that quietly works forever.

CategoryComfyCloudAPIs

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (4)

NameTypeDescription
IMAGEIMAGE
IMAGEIMAGE
IMAGEIMAGE
IMAGEIMAGE