Load Image List (dir)
The folder loader that tolerates mixed sizes
- IMAGE
- MASK
- INDEX
- FILENAMES
Same family as Load Image Batch (dir), one crucial difference: instead of stacking every image into a single batch tensor, this node hands you each image as its own item. Every output - IMAGE, MASK, INDEX, FILENAMES - is a list of one entry per image. No batching, no dimension police. If your folder contains mixed resolutions, or your downstream node wants to chew through images one at a time, this is the loader you want.
The inputs are identical to its batch sibling: directory (absolute path), skips, sort_by, recursive, trim_suffix. The sort_by options are worth knowing because they make order deterministic - text asc/desc, number asc/desc (it pulls the first number out of each filename, so frame_001, frame_002... sort correctly), or file modification time. skips drops the first N files off the sorted list, which is handy when a folder has a thumbnail you don't want.
Why would you choose a list over a batch when both exist? Two reasons, and both are about what the rest of your graph wants:
- Mixed sizes. A list of tensors has no "all the same shape" requirement, so a folder of different-sized images just works.
- List-friendly downstream nodes. ComfyUI's ecosystem has a whole family of nodes that take IMAGE lists and process each element independently - and those downstream nodes are exactly where
INDEXandFILENAMEScome in handy, since you can track which output belongs to which input as it flows through.
The mask behavior is the same as the batch version: each image's alpha channel becomes its mask, so a transparent PNG arrives with a ready-made matte.
The inputs and outputs at a glance
directory(required) - absolute path to the folderskips,sort_by,recursive,trim_suffix(optional) - same as the batch loader- Outputs:
IMAGE,MASK,INDEX(0-based position of each image),FILENAMES- all lists
Installing it
Zero extra dependencies, no model downloads - ComfyUI-Prompt-Helper only uses what ComfyUI already installs. ComfyUI Manager → ComfyUI-Prompt-Helper, or:
cd ComfyUI/custom_nodes
git clone https://github.com/elypha/ComfyUI-Prompt-Helper
Restart, and it's under image.
Rule of thumb: same-size folder and you want a single batch → use the batch loader. Different sizes, or you want per-image routing → this one. Between the two, most folder-processing workflows are covered.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | — | |
| skipsopt | INT | 00–9223372036854776000 | — |
| sort_byopt | COMBO | 7 options: None, As Text (Asc), As Text (Desc), As Number (Asc), As Number (Desc), Time Modified (ASC), +1 | |
| trim_suffixopt | BOOLEAN | false | If enabled, FILENAMES output will have the file suffix removed. |
| recursiveopt | BOOLEAN | false | If enabled, the directory will be searched recursively. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| INDEX | INT | — |
| FILENAMES | STRING | — |