LoadImageList☀
Batch-load a folder of images, in the order you actually want
- images
- file_name
ComfyUI's built-in LoadImage picks one file from a dropdown. When your job is "process all of these," you need something that reads a folder and hands you a batch - which is what LoadImageList does. It's the image twin of the pack's LoadTextList, and the two are meant to work together for folder-to-pipeline work.
How it works
Give it a folder, and it globs *.png, *.jpg, *.jpeg, *.gif, and *.bmp, sorts them by your chosen mode, slices them with start_index and max_output, and loads each into an IMAGE tensor. You get two list outputs: images (one tensor per file) and file_name (just the basenames). It skips files that fail to load instead of aborting, and logs a [DaShuai] message for each one it drops.
The sort modes are the real selling point. sort_mode gives you None, Alphabetical (ASC/DESC), Numerical (ASC/DESC), and Datetime (ASC/DESC, by file mtime). If your dataset has numbered frames or a meaningful file order, setting this is the difference between "in order" and "whatever the filesystem felt like that day."
Inputs
- folder_path - where the images live. Must exist, or the node raises.
- max_output - cap on how many to load; 0 means all of them.
- start_index - skip the first N files.
- sort_mode - the 7-way dropdown above.
- always_reload - same story as
LoadTextList: accepted, but this node never caches, so it always re-reads the folder fresh. The toggle is effectively a no-op in the current code.
Outputs are list-typed IMAGE and STRING, so they feed nodes that take image lists (for example, feeding a batch through an upscaler, a captioner, or an image-to-image sweep).
Gotchas
- Numerical sort extracts digits from the filename. Files without any digits sort as zero, which can scramble a mixed naming scheme.
- No VAE-encoded latents, no masks. This loads plain RGB tensors - if you need latent batches or alpha channels, look elsewhere.
- This is a folder node, not a file-picker. It can't see ComfyUI's
inputfolder dropdown list; it takes a raw path string. For absolute paths on a network share, that's actually the point.
Install
Same pack as the rest of DashuaiTools:
cd ComfyUI/custom_nodes
git clone https://github.com/Hasasasa/ComfyUI_DashuaiTools
then restart ComfyUI, or use ComfyUI Manager and search "DashuaiTools". It depends only on Pillow/numpy/torch, all already present in ComfyUI.
If you're batch-processing a folder of images - upscaling, captioning, img2img runs, before/after comparisons - this is the loader that makes the batch a one-click thing.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | — | |
| max_output | INT | 00–100 | — |
| start_index | INT | 00–1000 | — |
| sort_mode | COMBO | 7 options: None, Alphabetical (ASC), Alphabetical (DESC), Numerical (ASC), Numerical (DESC), Datetime (ASC), +1 | |
| always_reload | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| file_name | STRING | — |