ComfyUI > Nodes > ComfyUI 1hewNodes > Image Batch Range

ComfyUI Node: Image Batch Range

Class Name

1hew_ImageBatchRange

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

The node efficiently selects and processes a specific image subset from a batch for analysis.

Image Batch Range:

The 1hew_ImageBatchRange node is designed to efficiently handle and process a range of images from a batch, allowing you to select a specific subset of images based on your requirements. This node is particularly useful when working with large datasets where you need to focus on a particular segment of images for further processing or analysis. By specifying a starting index and the number of frames you wish to extract, this node provides a streamlined way to manage image data, ensuring that you can easily access and manipulate the exact portion of the dataset you need. This capability is essential for tasks that require precise control over image selection, such as creating animations, conducting detailed image analysis, or preparing data for machine learning models.

Image Batch Range Input Parameters:

image

The image parameter represents the batch of images from which you want to extract a specific range. This input is typically a tensor containing multiple images, and the node will operate on this data to select the desired subset. The images should be pre-loaded into this tensor format, and the node will handle the extraction based on the specified indices.

start_index

The start_index parameter determines the starting point within the batch of images from which the extraction will begin. It is an integer value that specifies the index of the first image to be included in the output. The value should be within the range of the total number of images in the batch, and it defaults to 0 if not specified. This parameter allows you to control precisely where the extraction process starts, enabling targeted data manipulation.

num_frame

The num_frame parameter specifies the number of consecutive images to extract from the batch, starting from the start_index. It is an integer value that defines how many images will be included in the output. The value should be positive and within the bounds of the remaining images from the start_index. This parameter is crucial for determining the size of the extracted subset, allowing you to tailor the output to your specific needs.

Image Batch Range Output Parameters:

selected_image

The selected_image output is the resulting tensor containing the subset of images extracted from the original batch. This output provides the specific range of images you have defined using the input parameters, allowing you to use this data for further processing or analysis. The output is crucial for workflows that require precise image selection, ensuring that you have access to the exact data you need.

Image Batch Range Usage Tips:

  • Ensure that the start_index and num_frame parameters are set correctly to avoid extracting an empty or unintended range of images.
  • Use this node in conjunction with other image processing nodes to create a comprehensive workflow that efficiently handles large datasets.
  • Consider the total number of images in your batch when setting the start_index and num_frame to prevent out-of-bounds errors.

Image Batch Range Common Errors and Solutions:

IndexError: list index out of range

  • Explanation: This error occurs when the start_index or num_frame parameters are set such that they exceed the bounds of the image batch.
  • Solution: Verify that the start_index is within the range of the total number of images and that num_frame does not extend beyond the available images from the start_index.

ValueError: negative dimensions are not allowed

  • Explanation: This error can occur if the num_frame parameter is set to a negative value.
  • Solution: Ensure that num_frame is a positive integer and within the valid range of the image batch size.

Image Batch Range 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 Range