Load Image From Directory
Your whole folder, wired in
- image
- directory
- name
ComfyUI's stock LoadImage has a one-file problem: you pick a single image from input/, and that's it. Load Image From Directory is the escape hatch - point it at a folder and it loads every .jpg, .jpeg, and .png in it, handing each one to you as a separate item on a list output. If you've ever batch-processed reference images or fed a folder of sources into a loop, you know the pain this removes.
It's the "individual" flavor of FairLab's folder loading. The sibling Load Image Batch From Directory stacks everything into one batched tensor; this one keeps them as a list of separate images, which is what you want when each image needs to travel to a different place, get its own filename treatment, or feed a node that iterates over list inputs.
Inputs and outputs
directory(STRING) in - the folder path, absolute, on the machine running ComfyUI.recursive(BOOLEAN) - if true, walks subfolders too; default false.channels(RGB / RGBA) - which channel layout to load into; default RGB.image(IMAGE, list) out - one image per file.directory(STRING, list) out - the folder per file.name(STRING, list) out - filename per image.
All three lists are index-aligned, so name[i] matches image[i].
How it works
It scans the folder (walking recursively if you ask), filters to image extensions, and converts each file to a ComfyUI IMAGE tensor, with a progress bar so you can watch a big folder churn through. The recursive toggle is the one that changes behavior most: off means a flat folder, on means every nested directory gets swept in, so be deliberate about it on a big tree.
Where it fits
Batch img2img, folder-of-references workflows, dataset inspection, and pairing with the pack's Load String From Directory for caption sidecars. Because names come back on wires, you can also wire the filename into a save node and keep output names matching your inputs.
Install
FairLab is one pack: ComfyUI Manager → search ComfyUI-FairLab, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
Restart, then find it under Fair/image. Loading is done with PIL via the backend, so no extra dependency beyond what ships with ComfyUI.
Gotchas
- The folder must be reachable by the ComfyUI process. In a Docker or remote setup,
input/on your browser machine is not the same filesystem - use a path the server can see. - If the directory is invalid, the node raises a hard error (
folder_path is not valid: ...) rather than silently doing nothing. That's actually the friendlier failure - the message tells you the exact path it rejected. - Non-image files are skipped quietly. A folder with mixed content loads only the
.jpg/.jpeg/.pngfiles.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | — | |
| recursive | BOOLEAN | false | — |
| channels | COMBO | RGB | 2 options: RGB, RGBA |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| directory | STRING | — |
| name | STRING | — |