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_pathis correctly specified and points to a valid directory to avoid errors. - Use the
start_indexandload_countparameters 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_pathdoes 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_indexorload_count. - Solution: Check the total number of images in the directory and adjust the
start_indexandload_countparameters accordingly to ensure they fall within the available range.
