Nodes/Allor Plugin/ImageBatchRemove
ComfyUI Node

ImageBatchRemove

Drop one image from a batch by index

By Nourepide·Created 3 years ago·Updated 2 years ago· 296
ImageBatchRemove
  • images
  • IMAGE
index1

ImageBatchRemove deletes one image from a batch. You point at an index, it returns the batch minus that image. That's the whole job, and it's exactly the kind of small, boring node you don't appreciate until you need it mid-workflow.

It's from the Allor Plugin (Nourepide/ComfyUI-Allor), sitting in the same image/batch family as ImageBatchJoin, ImageBatchFork and ImageBatchPermute. Where those recombine and reorder, this one trims. Think of the batch tools as a group: split, reorder, join, and remove - together they let you reshape a batch's contents without ever leaving the graph.

When do you actually delete a single frame? A few concrete cases: a batch of generated frames where the one you hate is always at position 3; a test batch where you want to drop a known-bad image before it hits the save node; or cleaning up the output of a matrix composite that generated one dud combination. It's also handy when a downstream node insists on an even batch size and your generator produced an odd count - drop the last one and everything aligns.

How it works

Straight torch: it slices the batch into images[:index] and images[index+1:] and concatenates the two halves. The index input is an INT with a default of 1, and the off-by-one convention is the same as the rest of the pack: it's 1-based, and it's clamped to the batch size. So removing index 1 drops the first image, and asking for an index larger than the batch just removes the last one rather than erroring. If you're used to Python's 0-based lists, the indexing will feel wrong until you've hit it once - you've been warned.

The output is IMAGE, the trimmed batch. Note the node removes exactly one image per call; to strip several you chain a few of them (or use ImageBatchGet to keep the ones you want instead).

The inputs

Just two:

  • images - the batch to trim.
  • index - which image to remove, INT, 1-based, default 1.

Installing it

This is pack-level, not node-level:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor

or search "Allor" in ComfyUI Manager, then restart. The pack's rembg/onnx dependencies serve its segmentation module, not the batch nodes, but Manager installs them regardless.

Gotchas

  • 1-based, clamped. The single most likely surprise. Removing index 1 means "remove the first image," and an out-of-range index silently removes the last one.
  • Only one image per node. It doesn't take a list of indices, so multi-removal means chaining.
  • Allor's usual startup behavior applies: it auto-updates at launch unless you set updates.auto_update to false in config.json, and installs that predate the repo's image-stripping rebase can throw git errors on update - a fresh clone sorts that out.

This pack has almost no community footprint on reddit, so when the docs are your friend, use them: nourepide.github.io/ComfyUI-Allor-Doc covers the batch module with more detail than this node's one-button simplicity suggests it needs.

Categoryimage/batch

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
indexINT1

Outputs (1)

NameTypeDescription
IMAGEIMAGE