Load Images into List 988
Dump a whole folder into the graph as a batch
- images
ComfyUI's built-in Load Image is designed for picking one file. The moment you want to process a folder of references - captions for a LoRA set, a stack of images for a VLM to analyze, a batch of frames for img2img - you're suddenly writing a loop or dragging ten separate loaders onto the graph. Load Images into List 988 does the obvious thing: point it at a directory and it loads every supported image (jpg, jpeg, png, webp) into a single output list.
That folder-scanning shape is exactly the kind of thing the VLM-captioning and dataset workflows in the KB are built on - caption a LoRA training set with a local VLM, batch-analyze references, run a consistent pass over a whole folder - and this is the feed-in end of those pipelines.
How it works
One input, directory - an absolute filesystem path. The node scans it, picks up files ending in .jpg, .jpeg, .png or .webp (case-insensitive), sorts them by name for a stable order, and converts each to a tensor via PIL, transposing EXIF orientation as it goes (so phone photos come out the right way up - a small thing that quietly prevents a lot of "why is this rotated" confusion). Files it can't read are skipped with a log line rather than killing the run.
The single output is images - a list of IMAGE tensors. Wire it into anything that consumes a list of images: a batch node, a VLM input on LM Studio 988, a folder-loop pattern.
Why you'd reach for it
Three classic jobs. Captioning: load a folder of training images, feed them to a vision model, collect captions. Analysis: dump a folder of references into a VLM and ask about them one by one. Batch processing: apply the same downstream pass to every image in a folder with one workflow. In each case the win is that the folder is the source of truth - drop new files in, re-run, the graph picks them up. No re-wiring.
Gotchas
- It needs a real absolute path, and it will raise
FileNotFoundErrorif the directory doesn't exist or contains no supported images. That's a loud error, which is good - but it also means a workflow with this node is not portable the way a PNG-embedded workflow is. Anyone you share it with must fix the path. - Order is by sorted filename, so
img2.jpgsorts beforeimg10.jpg. If ordering matters (it does for frames and for caption/tile pairing), name your files with zero-padding:img01,img02, …img10. - It converts everything to RGB, so alpha channels and grayscale are flattened. Fine for most pipelines; surprising if you needed transparency.
- Unreadable files are skipped silently-ish (a console log), so a folder full of corrupt files yields an empty list and the same FileNotFoundError. Check the console if "nothing loaded."
Install
Part of ComfyUI-988: Manager (search "ComfyUI-988") or:
cd ComfyUI/custom_nodes
git clone https://github.com/kajan988/ComfyUI-988
cd ComfyUI-988
pip install -r requirements.txt
Then restart. Depends on Pillow and numpy, both in the pack's light requirements - nothing else to download.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | List of loaded image tensors |