ComfyUI > Nodes > ComfyUI 1hewNodes > Image Batch Extract

ComfyUI Node: Image Batch Extract

Class Name

1hew_ImageBatchExtract

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

Efficiently extracts specific images from batches using user-defined criteria for streamlined processing.

Image Batch Extract:

The 1hew_ImageBatchExtract node is designed to efficiently extract specific images from a batch of images based on user-defined criteria. This node is particularly useful when working with large datasets where only a subset of images is needed for further processing or analysis. By allowing you to specify indices, modes, and other parameters, it provides a flexible way to manage and manipulate image batches. The node's primary goal is to streamline the process of selecting and extracting images, ensuring that you can focus on the images that are most relevant to your project. This capability is essential for AI artists who need to manage large volumes of image data efficiently.

Image Batch Extract Input Parameters:

image

The image parameter represents the batch of images from which you want to extract specific images. This input is crucial as it serves as the source data for the extraction process. The batch size, or the number of images in this input, directly influences the extraction process, as it determines the range of valid indices you can specify for extraction.

mode

The mode parameter dictates the method of extraction, allowing you to choose how images are selected from the batch. This could involve sequential selection, random sampling, or other modes depending on the implementation. The choice of mode affects the distribution and order of the extracted images, making it a key parameter for tailoring the extraction to your specific needs.

index

The index parameter specifies the starting point or specific indices of images to be extracted from the batch. This parameter is essential for pinpointing the exact images you want to work with, providing precise control over the extraction process. The indices must be within the range of the batch size to ensure valid extraction.

step

The step parameter determines the interval between selected images when extracting from the batch. This allows for spaced selection, which can be useful for reducing the number of images while maintaining a representative sample. The step size impacts the density and coverage of the extracted images.

uniform

The uniform parameter indicates whether the extraction should aim for a uniform distribution of images across the batch. This can be particularly useful when you want to ensure that the extracted images are evenly spread out, providing a balanced representation of the entire batch.

max_keep

The max_keep parameter sets a limit on the number of images to retain after extraction. This is useful for controlling the size of the output, especially when working with large batches where only a limited number of images are needed. Setting this parameter helps manage memory usage and processing time.

Image Batch Extract Output Parameters:

extracted_images

The extracted_images output contains the images that have been selected and extracted from the input batch based on the specified parameters. This output is crucial as it provides the subset of images that you can then use for further processing, analysis, or creative projects. The shape and size of this output depend on the input parameters, particularly the indices and max_keep settings.

Image Batch Extract Usage Tips:

  • Ensure that the index parameter values are within the range of the batch size to avoid errors and ensure valid extraction.
  • Use the mode parameter to tailor the extraction process to your specific needs, whether you require sequential, random, or other types of selection.
  • Adjust the step parameter to control the density of the extracted images, which can help in managing the volume of data you need to process.
  • Set the max_keep parameter to limit the number of images in the output, which is useful for optimizing performance and managing resources.

Image Batch Extract Common Errors and Solutions:

Index out of range

  • Explanation: This error occurs when the specified indices exceed the available range of the image batch.
  • Solution: Ensure that all indices specified in the index parameter are within the valid range of the batch size.

No valid indices found

  • Explanation: This error indicates that none of the specified indices were valid, resulting in an empty extraction.
  • Solution: Double-check the index and mode parameters to ensure they are set correctly and correspond to valid indices within the batch.

Extraction limit exceeded

  • Explanation: This error happens when the number of extracted images exceeds the max_keep limit.
  • Solution: Adjust the max_keep parameter to accommodate the desired number of images or refine the selection criteria to reduce the number of extracted images.

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