𝙆 Load Image Folder
Batch-load a whole directory of images at once
- images
- masks
The stock ComfyUI image loader wants one file at a time. Load Image Folder skips that entirely - point it at a directory and it hands you back every image inside as a list, ready for batch processing, a dataset-prep pass, or feeding a "run this over every image" workflow. It's not a KayTool exclusive as an idea (WAS Node Suite and a handful of other packs ship something similar), but if you've already got KayTool installed for its other utilities, this is a free way to avoid adding a second pack just for folder loading.
How it works
Give it a folder path and it loads every image inside as an IMAGE list, plus a matching MASK list (one per image), so anything downstream expecting per-image masks doesn't break even if your source images don't have explicit alpha channels. Flip subfolders on and it recurses into nested directories instead of stopping at the top level.
The path is a filesystem path, resolved on the machine actually running ComfyUI - same as any other file-path input in ComfyUI. If you're running locally that's your own disk; if you're running on a hosted or cloud instance, it needs to be a path that instance can actually see, not a path on your own laptop.
Because the outputs are lists rather than a single batched tensor, this pairs naturally with ComfyUI's list-execution behavior - nodes downstream that support list inputs will run once per image automatically, which is the pattern you want for a "process every file in this folder" workflow rather than manually managing a batch dimension yourself.
The inputs and outputs that matter
- path (STRING) - folder path containing images, per the node's own tooltip.
- subfolders (BOOLEAN, default false) - include images from nested folders, per the node's own tooltip.
- images (IMAGE, list output)
- masks (MASK, list output)
Installing it
Comes with the full KayTool install: ComfyUI Manager → search KayTool → install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/kk8bit/KayTool and restart. No extra dependencies specific to this node beyond the base pack.
Common issues
An empty output almost always means the path is wrong from the perspective of the machine running ComfyUI, not from yours - a relative path, a typo, or a path that only exists on your local machine while ComfyUI runs somewhere else are all the same failure and all look identical (nothing loads, no obvious error). Double-check the path is absolute and actually reachable by the process running the workflow before assuming the node is broken. If you expected images from nested folders and got none, confirm subfolders is actually toggled on - it defaults to off, so a folder-of-folders structure will silently only pick up whatever sits directly at the top level until you flip it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Path to folder containing images | |
| subfolders | BOOLEAN | false | Include images from subfolders |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |