Load Image:
The 1hew_LoadImage node is designed to facilitate the loading of images from a specified file path or directory, making it an essential tool for AI artists who need to incorporate external images into their projects. This node is capable of handling both individual image files and directories containing multiple images, providing flexibility in how images are accessed and utilized. It supports various image formats and ensures that images are correctly loaded and processed, including handling associated mask files if available. The node's primary goal is to streamline the process of importing images into your workflow, allowing you to focus on creative tasks without worrying about the technicalities of file handling.
Load Image Input Parameters:
folder
The folder parameter specifies the path to the image file or directory you wish to load. It is crucial for determining the source of the images. If a file path is provided, the node will attempt to load that specific image. If a directory path is given, the node will load all images within that directory. This parameter must be a valid path, and the images must be in supported formats. There are no explicit minimum or maximum values, but the path must be correctly formatted and accessible.
return_list
The return_list parameter is a boolean that determines whether the node should return a list of image paths or a single image. When set to true, the node will return a list of all image paths found in the specified directory. If set to false, it will return a single image file. This parameter is useful for batch processing or when you need to work with multiple images simultaneously.
include_subdir
The include_subdir parameter is a boolean that indicates whether the node should include images from subdirectories within the specified folder. When enabled, the node will recursively search for images in all subdirectories, providing a comprehensive list of image paths. This is particularly useful for organizing images in a hierarchical folder structure.
all_images
The all_images parameter is a boolean that, when set to true, enables batch preview mode. This mode generates a grid of images for quick viewing, limiting the number of images to a maximum of 200 to ensure performance is not compromised. This parameter is ideal for quickly assessing a large number of images without loading each one individually.
Load Image Output Parameters:
image_paths
The image_paths output provides a list of paths to the images that have been loaded. This output is essential for further processing or manipulation of the images within your workflow. It allows you to easily access and utilize the images that have been imported through the node.
single_image
The single_image output returns the image file that has been loaded when the return_list parameter is set to false. This output is useful when you are working with a single image and need to perform operations on it directly.
Load Image Usage Tips:
- Ensure that the
folderparameter is correctly set to the path of your image file or directory to avoid loading errors. - Use the
return_listparameter to switch between loading a single image or multiple images, depending on your project needs. - Enable
include_subdirif your images are organized in subdirectories to ensure all relevant images are loaded. - Utilize the
all_imagesparameter for a quick preview of multiple images, especially when dealing with large datasets.
Load Image Common Errors and Solutions:
"404 Not Found"
- Explanation: This error occurs when the specified file or directory path in the
folderparameter is invalid or inaccessible. - Solution: Verify that the path is correct and that the file or directory exists. Ensure that the path is properly formatted and that you have the necessary permissions to access it.
"Unsupported Image Format"
- Explanation: This error is triggered when the node attempts to load an image in an unsupported format.
- Solution: Check that the image files are in a supported format such as PNG, JPEG, or WEBP. Convert any unsupported image files to a compatible format before loading them.
"Image Size Mismatch"
- Explanation: This error can occur if the mask image associated with an image does not match the dimensions of the original image.
- Solution: Ensure that any mask images are the same size as their corresponding original images. Resize the mask images if necessary to match the dimensions of the original images.
