Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > PR-ComfyUI-ImageBatchUtils-b1ba3010

ComfyUI Extension: PR-ComfyUI-ImageBatchUtils-b1ba3010

Repo Name

ComfyUI-ImageBatchUtils-archive

Author
ComfyNodePRs (Account age: 0 days)
Nodes
View all nodes(1)
Latest Updated
2026-04-21
Github Stars
0.0K

How to Install PR-ComfyUI-ImageBatchUtils-b1ba3010

Install this extension via the ComfyUI Manager by searching for PR-ComfyUI-ImageBatchUtils-b1ba3010
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter PR-ComfyUI-ImageBatchUtils-b1ba3010 in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PR-ComfyUI-ImageBatchUtils-b1ba3010 Description

Preserved historical source snapshot. ComfyUI-ImageBatchUtils adds nodes to count, slice, pick, and unpack image batches and unpack mask batches, so workflows can route individual items while preserving their original dimensions.

ComfyUI-ImageBatchUtils-archive Introduction

ComfyUI-ImageBatchUtils is a preserved historical snapshot of a small collection of ComfyUI nodes for working with batches of images and masks. This documentation describes the accessible archive, not an actively maintained original repository. The original repository is unavailable.

A batch is a group of images passed through a workflow together. That is convenient for generating several results at once, but it can be awkward when you want to select one result, send different results down different paths, or process each crop separately. These nodes let you count, split, select, and route those images. A companion node splits mask batches in the same way.

For example, if SEGSPreview gives you several cropped segments, you can unpack them into individual items before sending them to a downstream node. This can help you inspect or process each segment separately when treating the group as one batch leads to unwanted duplicate processing.

How ComfyUI-ImageBatchUtils Works

Think of a batch as a stack of pictures. Unpack takes the pictures off the stack one at a time; Pick takes one picture at a chosen position; Slice takes a consecutive portion; and Count tells you how many pictures are in the stack.

Some ComfyUI nodes provide one batch, while others provide a list that may contain several batches. The image utility nodes can handle either form: they turn the input into individual images in order. The mask unpack node does the same for masks.

Each extracted image or mask keeps its original width and height. The nodes do not resize smaller items or pad them to match larger ones. This is especially useful when your input contains crops of different sizes.

There are two ways to unpack images:

  • List output: One output carries a list of individual images. Use it when the next node or workflow path can work with list items and you do not know in advance how many images there will be.
  • Fixed outputs: Four separate output connectors let you wire individual images to different paths. Use them when you want direct control over the first four images.

These are workflow utility nodes, not image-generation or enhancement models. They change how existing images and masks are organized, not what those images look like.

ComfyUI-ImageBatchUtils Features

All six nodes appear under the image/batch or mask/batch categories in the archived source.

NodeWhat it doesExample use
Image Batch Unpack (List) (ImageBatchUnpackDynamic)Turns all input images into a list of individual images, with no fixed number of output slots.Process every crop from a segmentation workflow separately.
Image Batch Unpack (4-slot) (ImageBatchUnpack)Sends the first four images to four separate outputs.Route four variations to different preview or processing paths.
Image Batch Count (ImageBatchCount)Returns the total number of images as an integer.Check how many crops or generated variations reached a point in your workflow.
Image Batch Slice (ImageBatchSlice)Returns a list containing a selected range of images.Keep images two through four from a larger group.
Image Batch Pick (ImageBatchPick)Returns one image at a selected position.Take only the last generated variation.
Mask Batch Unpack (List) (MaskBatchUnpackDynamic)Turns a batch or list of masks into a list of individual masks.Work with separate masks for different regions.

Choosing Images by Position

Pick uses an index setting. Counting starts at 0, so 0 selects the first image and 1 selects the second. Negative numbers count backward: -1 selects the last image. If the index is outside the available range, the node selects the nearest available image instead. If there are no images, it outputs a tiny blank placeholder rather than a selected image.

Slice uses start and end settings. start is included; end is not. For a five-image batch, start: 1 and end: 4 return the second, third, and fourth images. Negative positions count from the end, so start: -2 and end: 5 return the last two images in that five-image example. A range with no images returns an empty list.

Understanding Empty Fixed Slots

The 4-slot node always provides four output connectors, even when fewer than four images arrive. Unused connectors contain tiny 1 × 1 blank placeholders, not full-size images. If your workflow expects a meaningful image on every connected output, check the batch count first.

The archived README describes this node as having 16 slots, but the preserved node source defines four. This README follows the source.

Troubleshooting ComfyUI-ImageBatchUtils

A fixed output shows a tiny blank image

  1. Add Image Batch Count before the 4-slot unpack node to see how many images arrived.
  2. Check which output you connected. If only two images arrived, outputs three and four are placeholders.
  3. Use Image Batch Unpack (List) when the number of images varies and you do not need four separately wired outputs.

Pick returns a different image than expected

  1. Remember that the first image has index 0, not 1.
  2. Use -1 when you mean the last image.
  3. Check the batch count. An index beyond either end selects the nearest available image rather than producing an error.

Slice returns fewer images than expected

  1. Check that end is exclusive. To include the image at index 3, set end to at least 4.
  2. Check the number of incoming images with Image Batch Count.
  3. If using negative positions, count backward from the end of that incoming group. A range that resolves to no images produces an empty list.

Crops have different dimensions

This can be expected. Unpacking preserves each item's original size; it does not make all crops the same dimensions. If a later node requires matching image sizes, that requirement must be handled elsewhere in your workflow.

Frequently Asked Questions

Does the extension create or improve images?
No. It organizes images and masks already produced by other nodes.

Should I use the list or 4-slot image unpack node?
Use the list node for an unknown or changing number of images. Use the 4-slot node when you specifically need to connect up to four images to separate workflow paths.

Can the image nodes receive a list instead of a single batch?
Yes. The preserved source handles lists of image batches as well as a single image batch, extracting their images in order.

Will unpacking resize my images or masks?
No. Each extracted item retains its original spatial dimensions.

Why do I see information saying there are 16 fixed outputs?
That appears in the archived README, but the preserved source defines four. The source is the basis for the behavior described here.

Learn More about ComfyUI-ImageBatchUtils

The preserved source snapshot is the reference for the nodes described here. It is particularly useful if you need to check an output type or confirm how an edge case behaves. Because this is a historical archive rather than the actively maintained original repository, descriptions in older copies of its README may not match the preserved code.

PR-ComfyUI-ImageBatchUtils-b1ba3010 Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

PR-ComfyUI-ImageBatchUtils-b1ba3010 detailed guide | ComfyUI