Load Images From Folder (Soze)
The workhorse for batch runs
- Image
- Mask
- Load_Count
- Input_Path
- Image_Filename_Path
- Image_Filename
- Image_Filename_No_Ext
- Image_Changed
- status
This is the node most of the pack's other folder-and-index utilities are built around the same pattern as: point it at a directory, and it hands back one image at a time, driven by an index you increment across runs. Set ComfyUI's queue to run N times, N being however many images are in the folder, and you've got a batch pipeline running the same graph over every file without touching a dropdown between runs.
Where Image List Loader dumps the whole folder as a single list-typed output in one shot, this node processes one file per execution - the shape you want if each image needs to go through a full sampling or upscaling pipeline separately rather than being handled as a stacked tensor.
How it works
Input_Folder sets the directory; index picks which file in it loads this run. Image_Load_Count caps how many files the node considers total (separate from which one index currently points to). Beyond the image itself, it hands back the mask, the filename in a few forms, and a changed-flag - the same output shape as the pack's other Load Image nodes, kept consistent across the group so you can swap between them without rewiring downstream.
The inputs and outputs that matter
Input_Folder- required. The directory to load from.Image_Load_Count- optional, default1, min0. How many images from the folder are in scope.index- optional, default0, range 0–1,000,000. Which image to return this run. This is the field you drive from ComfyUI's queue count, or externally if you're calling the workflow via the API.- Output:
Image,Mask- the loaded image and mask. - Output:
Load_Count- how many files matched, for sanity-checking your loop bound. - Output:
Input_Path,Image_Filename_Path,Image_Filename,Image_Filename_No_Ext- the folder and filename in a few forms, for labeling outputs so you can trace a result back to its source file. - Output:
Image_Changed- BOOL, true if the selection differs from the previous run. - Output:
status- a status string.
How to install it
ComfyUI Manager: search "Quality of Life Nodes for ComfyUI" or "Soze." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
then restart. No models or heavy dependencies.
Common issues & troubleshooting
Batch run stops or repeats the same image. Check that index is actually incrementing across queue runs - if you queued N runs without something driving index upward (ComfyUI's own increment-on-queue behavior applies to widget values you've set to increment, not automatically to every node), you'll just process the same file N times. Set the widget's control mode to increment, or drive index from an external loop if you're calling via the API.
Load_Count doesn't match how many files you expected. This is your sanity check before committing to a big batch - if it's lower than expected, the folder likely has non-image files or a mixed set of extensions this node isn't picking up; if it's higher, check for stray files (thumbnails, .DS_Store, previous output copies) sitting in the same folder.
Filenames in the output don't match what you expect for a large or unsorted folder. As with the pack's other folder loaders, don't assume a specific sort order is guaranteed across operating systems and filesystems - if file order genuinely matters for your workflow, use consistent zero-padded numeric filenames rather than relying on directory listing order.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Input_Folder | STRING | — | |
| Image_Load_Countopt | INT | 1 | — |
| indexopt | INT | 00–1000000 | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| Image | IMAGE | — |
| Mask | MASK | — |
| Load_Count | INT | — |
| Input_Path | STRING | — |
| Image_Filename_Path | STRING | — |
| Image_Filename | STRING | — |
| Image_Filename_No_Ext | STRING | — |
| Image_Changed | BOOL | — |
| status | STRING | — |