ComfyUI > Nodes > ComfyUI Level Pixel > Get Iterator Data From Image Folders [LP]

ComfyUI Node: Get Iterator Data From Image Folders [LP]

Class Name

GetIteratorDataImageFolders|LP

Category
LevelPixel/Iterators
Author
LevelPixel (Account age: 647days)
Extension
ComfyUI Level Pixel
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install ComfyUI Level Pixel

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

Get Iterator Data From Image Folders [LP] Description

Facilitates image data organization by scanning directories, identifying subfolders, and counting images.

Get Iterator Data From Image Folders [LP]| Get Iterator Data From Image Folders [LP]:

The GetIteratorDataImageFolders| Get Iterator Data From Image Folders [LP] node is designed to facilitate the organization and retrieval of image data from specified directories, making it an essential tool for AI artists who work with large collections of images. This node scans through a given directory, identifies subfolders, and counts the number of images that match specified patterns within each folder. By doing so, it provides a structured overview of the image data available, which can be particularly useful for batch processing or iterative tasks. The node's ability to handle multiple image formats and its option to include subfolders in the search make it versatile and adaptable to various project needs. Overall, this node streamlines the process of managing image datasets, allowing you to focus more on creative tasks rather than data organization.

Get Iterator Data From Image Folders [LP]| Get Iterator Data From Image Folders [LP] Input Parameters:

directory_path

The directory_path parameter specifies the path to the directory where the node will search for image folders. It is crucial as it determines the root location from which the node will begin its search. The default value is an empty string, indicating that you need to provide a valid directory path for the node to function correctly. This parameter does not have a minimum or maximum value but must be a valid directory path.

patterns

The patterns parameter allows you to define the types of image files to be included in the search by specifying file patterns. For example, you can use patterns like *.jpg|*.png|*.jpeg to include JPEG and PNG files. This parameter is essential for filtering the images based on their formats, ensuring that only relevant files are counted. The default value is *.jpg|*.png|*.jpeg, and it does not have a minimum or maximum value.

subfolder

The subfolder parameter lets you specify a particular subfolder within each directory to search for images. This is useful if your images are organized into specific subfolders and you want to target those specifically. The default value is an empty string, meaning the node will search directly within each folder unless a subfolder is specified. There are no minimum or maximum values for this parameter.

rescan_each_queue

The rescan_each_queue parameter is a boolean that determines whether the node should rescan the directory each time it processes a queue. If set to True, the node will perform a fresh scan for each queue, ensuring that any new images added to the directory are included. The default value is True, which is useful for dynamic datasets that may change over time. This parameter does not have minimum or maximum values but is a simple toggle between True and False.

Get Iterator Data From Image Folders [LP]| Get Iterator Data From Image Folders [LP] Output Parameters:

iterator_data

The iterator_data output provides a structured list of dictionaries, each containing information about a folder, such as its index, name, and the count of images that match the specified patterns. This output is crucial for understanding the distribution of images across different folders and is used for further processing or iteration.

folder_count

The folder_count output indicates the total number of folders found within the specified directory. This count helps you gauge the extent of the dataset and can be used to verify that all intended folders have been included in the search.

image_count

The image_count output provides the total number of images found across all folders that match the specified patterns. This output is essential for understanding the size of the dataset and ensuring that all relevant images have been accounted for.

Get Iterator Data From Image Folders [LP]| Get Iterator Data From Image Folders [LP] Usage Tips:

  • Ensure that the directory_path is correctly set to the root directory containing your image folders to avoid errors and ensure accurate data retrieval.
  • Use specific patterns to filter out unwanted file types and focus on the image formats relevant to your project, which can help streamline processing and reduce unnecessary data handling.
  • If your images are organized into subfolders, make use of the subfolder parameter to target specific directories, which can help in managing large datasets more efficiently.
  • Set rescan_each_queue to True if your dataset is dynamic and you expect new images to be added frequently, ensuring that your data is always up-to-date.

Get Iterator Data From Image Folders [LP]| Get Iterator Data From Image Folders [LP] Common Errors and Solutions:

Error: not a directory

  • Explanation: This error occurs when the specified directory_path is not a valid directory.
  • Solution: Double-check the directory_path to ensure it points to a valid directory on your system.

Error: no files found

  • Explanation: This error indicates that no files matching the specified patterns were found in the directory.
  • Solution: Verify that the patterns parameter is correctly set to match the file types present in your directory.

Error: index out of range

  • Explanation: This error can occur if the node attempts to access a folder index that does not exist.
  • Solution: Ensure that the directory contains folders and that the node's parameters are set correctly to avoid accessing non-existent indices.

Get Iterator Data From Image Folders [LP] Related Nodes

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

Get Iterator Data From Image Folders [LP]