Elegant Load Image (from Folder)
Stop Feeding ComfyUI One Image at a Time
- images
- filename
The stock Load Image node gives you a dropdown with one file in it. Fine for the render you're babysitting, useless the moment you've got 200 frames off a camera, a LoRA dataset to caption, or a folder of old outputs you want to push through an upscale pass. So you drag files in one at a time, or write a script outside ComfyUI that re-queues the graph for you. Elegant Load Image (from Folder) skips all that: point it at a folder, queue once, and the whole folder goes through.
What it is
ComfyUI core already has a Load Image (from Folder) node (it lives in comfy_extras/nodes_dataset.py, which tells you who it was built for). This is that node plus the two things you want within five minutes of using it: each image's file name as its own output, and a way to work on a slice of a folder instead of all of it.
It comes from wipeer/comfyui-elegant-nodes, a small pack of plumbing nodes (seed, resolution selector, text and math previews) built to keep working inside subgraphs. This is the least plumbing-ish node in the pack, and the one with the most obvious day-one use.
How it works
images is a list. ComfyUI's executor runs a node once per item when it's fed one, so everything downstream of this loader - resizer, ControlNet, sampler, save - fires once per image. The list is the loop; you don't build it.
Files load in natural name order (img2.png before img10.png), EXIF camera rotation is applied, and the node re-runs when the folder changes - add, remove or touch a file, and the next queue picks up the new set instead of a cached run.
The constraint that catches people: folder must be inside ComfyUI's input directory. The source resolves the path and refuses anything that leads outside it. You can't point this at D:\Shoot_2026\raw; copy or symlink the folder into ComfyUI/input/ first. Same three-directory convention as the rest of ComfyUI: input/ is what you upload into.
The inputs that matter
folder is a dropdown built from the input directory's subfolders, so the folder has to exist before ComfyUI starts to be listed. Added one while it was running? Press R on the node.
filter gets the most mileage. It's a wildcard match on the file name - * anything, ? one character, [abc] one of a, b, c, case ignored:
*train_??5.* # train_005.png, train_115.jpg, ...
*[45].png # anything ending that way
Empty means everything. Even with include_subfolders on, the filter only ever matches the file name, never the folder name. And there's no GIF support: PNG, JPG, JPEG, WEBP, BMP, TIF, TIFF only.
start_index and limit carve out a range after filtering and sorting - start_index 5, limit 4 loads images 5 through 8, and limit 0 (the default) means all the rest. Point start_index past the last match and the run stops with a message rather than quietly doing nothing.
filename_format hides behind the ⚙ advanced toggle and defaults to file name, which is the one you want. The other choices are the name without extension, or the full server path.
Two outputs, both lists, in the same order. images feeds your pixel pipeline. filename goes into a Save Image filename_prefix - right-click that widget, convert it to an input, and each image saves under its own name instead of ComfyUI_00001_.png. If you're re-saving a dataset, that's the whole reason to pick this over the core node. The node also prints a summary of itself, like 4 images from pets · 12 of 120 match *train_* · #5–#8 of 12.
Installing it
ComfyUI Manager, search Elegant Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/wipeer/comfyui-elegant-nodes.git
pip install -r comfyui-elegant-nodes/requirements.txt
Restart and refresh the browser. The pip install is nearly a no-op - the only dependency is simpleeval, which ComfyUI already ships - but it costs nothing. You do need ComfyUI 0.4.0 or newer, since the pack is written against the V3 node API, and the node lives under utilities/elegant.
Where people get tripped up
"No images in …" - your filter matched nothing. Clear it as a sanity check.
"Folder is outside the input directory." You gave it a path instead of a folder name.
The folder isn't in the dropdown. It didn't exist when ComfyUI started, or it's empty. Restart, or press R.
Manager lists the pack with no nodes. Real, and documented by the author: the Comfy Registry's node extraction for this pack has been stuck at "pending" (a registry-side issue affecting more than one pack), so Manager can show "No nodes found" while the install is fine and all seven nodes load. Ignore the empty list, or clone it by hand.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| folder | COMBO | Folder inside ComfyUI's input directory. Its images are loaded (PNG, JPG, WEBP, BMP, TIFF); those in subfolders only with include_subfolders on. | |
| filename_format | COMBO | file name | What the filename output holds: the file name (photo.png), the name without extension (photo) or the full path on the server. |
| filteropt | STRING | Load only images whose file name matches, e.g. *train_??5.* (* = anything, ? = one character, [abc] = one of a, b, c; case is ignored). Empty: all images. | |
| include_subfoldersopt | BOOLEAN | false | Also load images in the folder's subfolders, at any depth. The filter still matches only the file name. |
| start_indexopt | INT | 11–1000000 | Number of the first image to load, counting from 1, after filtering and sorting. |
| limitopt | INT | 00–1000000 | Most images to load from start_index on. 0: no limit. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The images, one by one. |
| filename | STRING | The file name of each image, in the same order. |