Image Gallery Loader:
The LocalImageGallery node is designed to facilitate the loading and processing of images from a local directory, making it an essential tool for AI artists who work with image datasets. This node allows you to select images from specified folders, ensuring that the images are correctly oriented and converted into a format suitable for further processing in AI models. By handling image loading, orientation correction, and conversion to a tensor format, the LocalImageGallery node streamlines the workflow for artists, enabling them to focus on creative tasks rather than technical details. Its robust error handling ensures that even if an image cannot be loaded, the system remains stable by providing a default blank image, thus maintaining the continuity of the workflow.
Image Gallery Loader Input Parameters:
selected_image
The selected_image parameter specifies the name of the image file you wish to load from the local directory. This parameter is crucial as it determines which image will be processed by the node. If no image is selected, the node will return a blank image, ensuring that the workflow does not break. There are no specific minimum or maximum values for this parameter, but it should correspond to a valid image file name within the specified directory.
source_folder
The source_folder parameter allows you to define the directory from which images will be loaded. This parameter is important for organizing and accessing images stored in different folders. If a valid source folder is provided, the node will attempt to load images from this directory; otherwise, it defaults to a pre-configured input directory. The folder path must be valid and accessible to ensure successful image loading.
metadata_filter
The metadata_filter parameter enables you to filter images based on the presence of metadata. This can be particularly useful if you want to process only images with specific metadata attributes. The options for this parameter typically include "all," "with," and "without," allowing you to include all images, only those with metadata, or only those without metadata, respectively.
Image Gallery Loader Output Parameters:
img_tensor
The img_tensor output parameter represents the processed image in a tensor format, which is suitable for input into AI models. This tensor is a normalized representation of the image, ensuring that it can be efficiently used in machine learning workflows. The conversion to a tensor format is crucial for compatibility with various AI frameworks, allowing for seamless integration into your creative projects.
blank
The blank output parameter is a default tensor returned when an image cannot be loaded due to errors or when no image is selected. This tensor is a placeholder that maintains the workflow's continuity, preventing errors from disrupting the process. It is a zero-filled tensor with a standard size, ensuring that subsequent nodes in the workflow can handle it without issues.
Image Gallery Loader Usage Tips:
- Ensure that the
selected_imageparameter corresponds to a valid image file name within the specified directory to avoid loading errors. - Utilize the
source_folderparameter to organize your images into different directories, making it easier to manage large datasets. - Use the
metadata_filterparameter to streamline your workflow by processing only images with the desired metadata attributes.
Image Gallery Loader Common Errors and Solutions:
Image Gallery Loader: No image selected, returning blank image.
- Explanation: This error occurs when no image is specified in the
selected_imageparameter. - Solution: Ensure that you provide a valid image file name in the
selected_imageparameter to load the desired image.
Image Gallery Loader: Invalid path attempted: <image_path>
- Explanation: This error indicates that the specified image path is not valid or does not fall within the allowed directory.
- Solution: Verify that the
source_folderandselected_imageparameters are correctly set to point to a valid and accessible directory and image file.
Image Gallery Loader: Image not found: <image_path>
- Explanation: This error means that the specified image file does not exist in the given directory.
- Solution: Check the
selected_imageparameter to ensure that the file name is correct and that the image exists in the specified directory.
