Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI_SamplingUtils > Load Images (Directory)

ComfyUI Node: Load Images (Directory)

Class Name

SU_LoadImageDirectory

Category
advanced/image
Author
silveroxides (Account age: 2211days)
Extension
ComfyUI_SamplingUtils
Latest Updated
2026-06-03
Github Stars
0.02K

How to Install ComfyUI_SamplingUtils

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

Load Images (Directory) Description

Facilitates loading image files from directory, streamlining access, organization, and batch processing for AI artists.

Load Images (Directory):

The SU_LoadImageDirectory node is designed to facilitate the loading of image files from a specified directory, making it an essential tool for AI artists who work with large datasets of images. This node streamlines the process of accessing and organizing image files by automatically identifying and selecting valid image formats such as .png, .jpg, .jpeg, .webp, .bmp, .tiff, .gif, and .mpo. By sorting and slicing the images based on user-defined parameters, it allows for efficient batch processing and easy integration into workflows that require image manipulation or analysis. The node's primary goal is to enhance productivity by reducing the manual effort involved in managing image directories, thus enabling artists to focus more on creative tasks.

Load Images (Directory) Input Parameters:

directory_path

The directory_path parameter specifies the path to the directory containing the images you wish to load. It is crucial for determining the source location from which the images will be retrieved. The path must be valid and point to an existing directory; otherwise, the node will raise an error. This parameter does not have a default value and must be provided by the user.

start_index

The start_index parameter defines the starting point in the list of sorted image files from which the loading process will begin. It allows you to skip a certain number of images at the beginning of the directory, which can be useful for batch processing or when working with large datasets. The minimum value is 0, and there is no explicit maximum value, but it should be within the range of available images.

load_count

The load_count parameter determines the number of images to load starting from the start_index. This parameter is essential for controlling the batch size of images being processed, allowing you to manage memory usage and processing time effectively. The minimum value is 1, and there is no explicit maximum value, but it should not exceed the number of images available from the start_index.

Load Images (Directory) Output Parameters:

output_images

The output_images parameter provides a list of loaded image files from the specified directory. These images are ready for further processing or analysis within your workflow. The output is crucial for any subsequent operations that require image data, such as transformations, enhancements, or AI model inputs.

output_masks

The output_masks parameter outputs any associated masks for the loaded images, if applicable. Masks are often used in image processing to isolate specific areas of an image for targeted operations. This output is particularly useful for tasks involving segmentation or selective editing.

output_masks_inverted

The output_masks_inverted parameter provides the inverted versions of the output masks. Inverted masks can be used to apply operations to the background or non-selected areas of an image, offering additional flexibility in image processing tasks.

Load Images (Directory) Usage Tips:

  • Ensure that the directory_path is correctly specified and points to a valid directory to avoid errors.
  • Use the start_index and load_count parameters to efficiently manage large datasets by loading only the necessary images for your current task.
  • Regularly update the directory contents if new images are added, ensuring that the node processes the most recent files.

Load Images (Directory) Common Errors and Solutions:

Invalid directory path: <directory_path>

  • Explanation: This error occurs when the specified directory_path does not point to a valid directory.
  • Solution: Verify that the path is correct and that the directory exists on your file system.

No images found in range [<start_index>:<end_index>] in directory: <directory_path>

  • Explanation: This error indicates that there are no images available in the specified range, possibly due to an incorrect start_index or load_count.
  • Solution: Check the total number of images in the directory and adjust the start_index and load_count parameters accordingly to ensure they fall within the available range.

Load Images (Directory) Related Nodes

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

Load Images (Directory)