ComfyUI > Nodes > ComfyUI 1hewNodes > Image Batch Split

ComfyUI Node: Image Batch Split

Class Name

1hew_ImageBatchSplit

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 Split Description

Efficiently splits image batches into two based on criteria, optimizing asynchronous processing.

Image Batch Split:

The 1hew_ImageBatchSplit node is designed to efficiently divide a batch of images into two separate batches based on specified criteria. This node is particularly useful when you need to process or analyze subsets of a larger image batch independently. By allowing you to specify how many images to take from the start or end of the batch, it provides flexibility in handling image data, which can be crucial for tasks like training machine learning models or performing batch-specific operations. The node ensures that the splitting process is handled asynchronously, optimizing performance and reducing processing time. This capability is essential for AI artists who work with large datasets and need to manage their image batches effectively.

Image Batch Split Input Parameters:

image

The image parameter represents the batch of images you want to split. It is crucial as it serves as the primary data input for the node. The batch size is determined by the number of images in this input, and the node will operate on this batch to produce the desired output. There are no specific minimum or maximum values for this parameter, but it should be a valid batch of images in a compatible format.

take_count

The take_count parameter specifies the number of images to be included in the first batch after the split. This parameter directly influences how the batch is divided, with the remaining images forming the second batch. The value of take_count should be a positive integer, and it must be less than or equal to the total number of images in the batch. If take_count is greater than or equal to the batch size, the node will handle this gracefully by assigning all images to the first batch and leaving the second batch empty.

from_start

The from_start parameter is a boolean that determines the direction of the split. If set to True, the node will take the specified number of images from the start of the batch for the first batch. If set to False, the node will take the images from the end of the batch. This parameter allows you to control the orientation of the split, providing flexibility in how you manage your image data.

Image Batch Split Output Parameters:

first_batch

The first_batch output contains the subset of images extracted from the original batch based on the take_count and from_start parameters. This batch is crucial for any subsequent processing or analysis you wish to perform on this specific subset of images. The size and content of this batch depend on the input parameters, and it can range from being empty to containing the entire original batch.

second_batch

The second_batch output contains the remaining images from the original batch after the first batch has been extracted. This output is essential for scenarios where you need to handle the leftover images separately. Like the first_batch, the size and content of this batch are determined by the input parameters, and it can also range from being empty to containing the entire original batch.

Image Batch Split Usage Tips:

  • Ensure that the take_count parameter is set appropriately based on the size of your image batch to avoid unexpected empty outputs.
  • Use the from_start parameter to control the orientation of your split, which can be useful for tasks that require specific subsets of data from either the beginning or end of your batch.

Image Batch Split Common Errors and Solutions:

"取数({take_count})≥总数({batch_size})"

  • Explanation: This error occurs when the take_count is greater than or equal to the total number of images in the batch.
  • Solution: Adjust the take_count to be less than the total number of images in the batch to ensure a valid split.

"错误: {str(e)}"

  • Explanation: This is a generic error message indicating that an exception has occurred during the execution of the node.
  • Solution: Check the input parameters and ensure they are correctly set. Review the error message for specific details and adjust your inputs accordingly.

Image Batch Split 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.

Image Batch Split