ComfyUI > Nodes > ComfyUI 1hewNodes > Image Batch Group

ComfyUI Node: Image Batch Group

Class Name

1hew_ImageBatchGroup

Category
1hewNodes/batch
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI 1hewNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 1hewNodes 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

Image Batch Group Description

Efficiently manages and processes image batches, offering flexibility for AI artists' workflows.

Image Batch Group:

The 1hew_ImageBatchGroup node is designed to efficiently manage and process batches of images, particularly when dealing with large datasets or when specific batch configurations are required. This node is essential for AI artists who need to handle image data in a structured manner, allowing for the grouping of images into batches based on specified parameters such as batch size and overlap. The node ensures that images are processed in a way that maximizes efficiency and consistency, even when the total number of images does not perfectly divide into the desired batch size. By providing options for handling incomplete batches, such as dropping them or adjusting the batch size, the node offers flexibility and control over the image processing workflow. This capability is particularly beneficial in scenarios where uniformity in batch processing is crucial, such as in training machine learning models or generating consistent outputs in creative projects.

Image Batch Group Input Parameters:

batch_size

The batch_size parameter determines the number of images included in each batch. It directly impacts how the images are grouped and processed, with larger batch sizes potentially improving processing efficiency but requiring more memory. The minimum value is 1, and there is no explicit maximum value, but it should be set according to the available system resources. The default value is typically set to a reasonable number based on common use cases, such as 32 or 64.

overlap

The overlap parameter specifies the number of images that overlap between consecutive batches. This can be useful for ensuring continuity or consistency between batches, especially in tasks where context from previous images is important. The minimum value is 0, indicating no overlap, and the maximum value is less than the batch_size. The default value is often set to 0 unless specific overlap is required for the task.

last_batch_mode

The last_batch_mode parameter defines how the node handles the last batch when the total number of images is not a perfect multiple of the batch_size. Options include "drop_incomplete," which discards any incomplete batch, and "backtrack_last," which adjusts the last batch to include all remaining images. This parameter is crucial for maintaining the integrity of the batch processing, especially in scenarios where incomplete batches could lead to inconsistent results.

Image Batch Group Output Parameters:

output_image

The output_image parameter represents the processed batch of images. It is the primary output of the node, containing the images grouped according to the specified batch size and overlap. This output is essential for subsequent processing steps, ensuring that the images are correctly batched and ready for further analysis or model training.

start_indices

The start_indices parameter provides the starting indices of each batch within the original set of images. This information is useful for tracking and referencing specific batches, especially when debugging or analyzing the batch processing workflow. It helps in understanding how the images were grouped and can be used to verify the correctness of the batching process.

batch_counts

The batch_counts parameter indicates the number of images in each batch. This output is important for verifying that the batches have been created as expected, particularly when dealing with varying batch sizes due to overlap or incomplete batches. It provides a quick reference to ensure that the batching process aligns with the specified parameters.

valid_counts

The valid_counts parameter reflects the number of valid images in each batch, excluding any padding or filler images that may have been added to meet the batch size requirements. This output is crucial for understanding the actual content of each batch and ensuring that the processing results are based on valid data.

Image Batch Group Usage Tips:

  • Adjust the batch_size according to your system's memory capacity to optimize performance without overloading resources.
  • Use the overlap parameter to maintain continuity between batches, especially in tasks where context is important, such as video frame processing.
  • Choose the appropriate last_batch_mode based on your project's requirements for handling incomplete batches, ensuring consistent results.

Image Batch Group Common Errors and Solutions:

"Batch size exceeds total images"

  • Explanation: This error occurs when the specified batch_size is larger than the total number of images available.
  • Solution: Reduce the batch_size to a value that is less than or equal to the total number of images.

"Invalid overlap value"

  • Explanation: This error indicates that the overlap value is set to a number greater than or equal to the batch_size.
  • Solution: Adjust the overlap to be less than the batch_size to ensure valid batch processing.

"Incomplete batch dropped"

  • Explanation: This message appears when the last_batch_mode is set to "drop_incomplete," and the last batch does not meet the batch_size requirement.
  • Solution: Consider changing the last_batch_mode to "backtrack_last" if retaining all images is important for your project.

Image Batch Group Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI 1hewNodes
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.