ComfyUI > Nodes > kaytool > 𝙆 Load Image Folder

ComfyUI Node: 𝙆 Load Image Folder

Class Name

Load_Image_Folder

Category
KayTool
Author
kk8bit (Account age: 1010days)
Extension
kaytool
Latest Updated
2026-04-06
Github Stars
0.34K

How to Install kaytool

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

The `Load_Image_Folder` node automates loading and processing images from directories, supporting various formats and subfolders, converting to RGB, and generating masks for alpha channels.

𝙆 Load Image Folder:

The Load_Image_Folder node is designed to streamline the process of loading and processing images from a specified directory on your system. This node is particularly beneficial for AI artists who need to work with large datasets of images, as it automates the retrieval and preparation of image files for further processing. By supporting a variety of common image formats such as .jpg, .jpeg, .png, and .bmp, the node ensures compatibility with most image datasets. It also offers the flexibility to include images from subfolders, making it easier to manage complex directory structures. The node processes each image by converting it to a consistent RGB format and generates a corresponding mask if the image contains an alpha channel. This functionality is crucial for tasks that require image segmentation or masking. Overall, the Load_Image_Folder node simplifies the workflow of loading and preparing images, allowing you to focus on creative tasks rather than technical details.

𝙆 Load Image Folder Input Parameters:

path

The path parameter specifies the directory from which images will be loaded. It is crucial for determining the source of the image dataset. If the provided path is invalid or not a directory, the node will attempt to use a default input directory. This parameter directly impacts the images that will be processed and loaded into the system. There are no explicit minimum or maximum values, but it must be a valid directory path.

subfolders

The subfolders parameter is a boolean option that determines whether images should be loaded from subdirectories within the specified path. When set to True, the node will recursively search through all subfolders, allowing for a more comprehensive image dataset to be loaded. This is particularly useful for organizing images into categories or themes within separate folders. The default value is typically False, meaning only the top-level directory is considered unless specified otherwise.

𝙆 Load Image Folder Output Parameters:

images

The images output parameter provides a list of image tensors that have been loaded and processed from the specified directory. Each image is converted to an RGB format and normalized to a float32 tensor, making it ready for further processing or analysis in AI models. This output is essential for any subsequent image processing tasks, as it provides the raw data in a format that is compatible with machine learning frameworks.

masks

The masks output parameter delivers a list of mask tensors corresponding to the loaded images. These masks are particularly important for images with an alpha channel, as they represent the transparency information. For images without an alpha channel, a default mask of zeros is provided. This output is crucial for tasks involving image segmentation or any application where distinguishing between different parts of an image is necessary.

𝙆 Load Image Folder Usage Tips:

  • Ensure that the path parameter is set to a valid directory containing the images you wish to load. This will prevent errors related to invalid paths and ensure that the correct dataset is processed.
  • Utilize the subfolders parameter to include images from nested directories, which can be particularly useful for organizing large datasets into manageable categories.

𝙆 Load Image Folder Common Errors and Solutions:

No valid images found in '<target_dir>'

  • Explanation: This error occurs when the specified directory does not contain any images with the supported file extensions.
  • Solution: Verify that the directory path is correct and contains images with valid extensions such as .jpg, .jpeg, .png, or .bmp. Ensure that the subfolders option is set correctly if images are stored in subdirectories.

Invalid path: <path>

  • Explanation: This error indicates that the provided path is not a valid directory.
  • Solution: Double-check the path to ensure it is correct and points to an existing directory. If necessary, adjust the path to a valid directory containing the desired images.

𝙆 Load Image Folder Related Nodes

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