PD_Load Images
A folder loader that hands you filenames too
- images
- masks
- file_paths
PD_Load Images (Load_Images_V1) loads every image in a folder - including subfolders - into a batch, and crucially hands you the file paths along with the pixels. That last bit is the differentiator. Core ComfyUI's Load Image is one image at a time from its own input directory; this node is for when you want to walk a whole folder and still know which file each frame came from.
Why you'd reach for it
Batch processing, basically. You point it at a directory, and out comes a stack of images, their masks, and the source file paths. That path output is gold for anything where the filename matters downstream - pairing images with their .txt caption files, matching by naming convention, or just knowing what you're looking at in a batch preview. It's the natural front end for the "process a folder" workflows this pack is full of, and it pairs well with a LoRA-dataset-prep flow where you load a directory and need names to line up with captions.
How it works
It walks the directory recursively (os.walk), collects image files, and sorts them. The sort_method dropdown matters more than it looks: numeric sorts by embedded numbers (so img2 comes before img10), alphabetic is plain string order, and natural does human-style ordering. Getting this right is the difference between your batch running in a sensible sequence and a nonsense one. Results are cached by default; load_always forces a re-read of the folder, which you want if the folder changes while a workflow is open. image_load_cap (0 = unlimited) and start_index let you grab a slice rather than everything. The seed input suggests the V1 supports some shuffling/selection - it's there if you want reproducibility across runs.
Outputs
images- the batch of loaded IMAGE tensors.masks- the matching alpha masks.file_paths- full paths for every loaded image. This is the output the core Load Image doesn't give you.
Installing
This ships in 7BEII/Comfyui_PDuse. ComfyUI Manager → search "Comfyui_PDuse" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/Comfyui_PDuse
cd Comfyui_PDuse
pip install -r requirements.txt
Restart after. No model downloads; dependencies are Pillow, numpy, opencv-python and the pack's usual list, with torch from ComfyUI.
Gotchas
The folder path is typed by hand, so it's absolute-path land - there's no file browser like core Load Image has. And because results are cached, a folder you edit while ComfyUI is open can look stale until you flip load_always. If you want the names (not just full paths) or per-file numbering as separate outputs, that's what the Advance variant in the same pack adds; V1 keeps it to three outputs and a seed.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | — | |
| image_load_capopt | INT | 0 | — |
| start_indexopt | INT | 00–18446744073709550000 | — |
| load_alwaysopt | COMBO | false | 2 options: false, true |
| sort_methodopt | COMBO | numeric | 3 options: numeric, alphabetic, natural |
| seedopt | INT | 00–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |
| file_paths | STRING | — |