ComfyUI Extension: ComfyUI-ImageBatchUtils

Authored by xuxiao305

Created

Updated

0 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Lightweight ComfyUI custom nodes for working with image and mask batches. No dependencies beyond ComfyUI itself.

README

ComfyUI-ImageBatchUtils

Lightweight ComfyUI custom nodes for working with image and mask batches. No dependencies beyond ComfyUI itself.

Nodes

🧩 Image Batch Unpack (List)

ImageBatchUnpackDynamic

Unpack an image batch [B, H, W, C] into a list of individual images, each [1, H, W, C]. Works with any batch size.

This is the most commonly useful node — connect it after any node that outputs a batch and pipe the list into nodes that accept LIST[IMAGE].

🧩 Image Batch Unpack (16-slot)

ImageBatchUnpack

Unpack an image batch into 16 fixed output slots. If the batch has fewer than 16 images, extra slots contain empty (zero) tensors. Useful when you need to route individual images to different nodes in the graph.

🔢 Image Batch Count

ImageBatchCount

Returns the batch size as an INT. Useful for conditional logic or debugging.

✂️ Image Batch Slice

ImageBatchSlice

Slice an image batch by start/end indices (like Python slicing). Supports negative indexing.

👆 Image Batch Pick

ImageBatchPick

Pick a single image from a batch by index. Supports negative indexing (e.g., -1 for the last image).

🧩 Mask Batch Unpack (List)

MaskBatchUnpackDynamic

Unpack a mask batch [B, H, W] into a list of individual masks, each [1, H, W].

Installation

Via ComfyUI Manager (recommended)

Search for ComfyUI-ImageBatchUtils in the Manager.

Manual

cd ComfyUI/custom_nodes
git clone https://github.com/YOUR_USERNAME/ComfyUI-ImageBatchUtils.git

No additional pip packages needed.

Use Case: SEGSPreview Duplicate Fix

A common workflow issue: SEGSPreview outputs a batch of cropped segment images, but some downstream nodes process each image in the batch independently, causing duplicates. Using ImageBatchUnpackDynamic you can split the batch and work with each segment individually.

License

MIT

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more