Load Multiple Images with Name, Directory, Title, Description
The Batch Feeder That Walks a Folder One Image at a Time
- IMAGE
- filename
- directory
- title
- description
The one-node version of "process every file in this folder"
ComfyUI's stock Load Image only ever hands you one image. If you want to run a whole folder of files through an upscaler, an inpaint pass, or a captioning workflow, you usually end up dragging each file in by hand or re-picking it every queue run. LoadMultipleImagesExtended automates the swap: give it a directory and each time the queue runs it feeds the next image in that folder, along with the file's name, its folder path, and any title/description metadata hiding inside the file.
It comes from milan-nodes-comfyui, a two-node pack by Milan M. that's effectively an extension of WAS Node Suite's ideas - the README credits WASasquatch directly. It isn't famous; you won't see it hyped on r/comfyui, and the node barely registers in search. But it fills a gap the core graph just leaves open: nothing stock walks a directory for you.
How it actually works
The trick is state. The node keeps a current_index in a database.json file it writes next to the pack (in custom_nodes/milan-nodes-comfyui/), so it remembers where it left off - across queue runs and even across restarts. Each execution:
- lists and sorts the images in your folder (only
.png,.jpg,.jpegcount), - loads the file at the current index,
- bumps the index by one, wrapping to zero when it hits the end.
Because it loads exactly one image per execution, the "quantity" is set by the batch count on the Queue button - that little number right of ▶️ Queue. Want ten files per run? Set the batch to 10. This trips up people who expect a "load all" switch; there isn't one, by design.
The input and outputs that matter
One required input, input_dir: an absolute path to a folder. There's no folder browser - you type or paste the path, so on Windows remember to escape backslashes.
IMAGE- the current image; wire this into whatever you're processing.filename/directory- the file's name (no extension) and the path you supplied, handy for naming save nodes or logging progress.title/description- EXIF/PNG metadata if the file has any, empty string otherwise.
Note what's missing: no MASK output here, unlike the pack's one-image sibling. Don't plan on alpha handling with this node.
Installing it
Install via ComfyUI Manager (search "milan-nodes-comfyui") or clone by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/matorzhin/milan-nodes-comfyui
Then restart ComfyUI. There are no extra pip dependencies - the pack runs entirely on Pillow, torch, and numpy that ComfyUI already bundles. That's the lightest dependency load you'll get out of a custom node.
Where people get burned
- The counter is shared. Every workflow using this node reads the same
database.json. Point two different folders at it and they're walking one index, so files get skipped. Deletingdatabase.json(it's gitignored, created on first use) resets the walk. - Only
.png/.jpg/.jpeg. Drop a folder of webps in and it errors with "No supported images found." - A mistyped path fails loudly. There's no visual picker, so paste carefully - it raises an error if the directory doesn't exist.
- Every run consumes a slot. The node intentionally reports a change each execution so ComfyUI never caches it away. That's the point, but it means you can't "preview" a run without advancing the cursor.
For feeding a folder through a pipeline one file at a time, this is the tool - just treat database.json as a cursor you can reset when the walk gets out of sync.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input_dir | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| filename | STRING | — |
| directory | STRING | — |
| title | STRING | — |
| description | STRING | — |