Load Image Serially (from Folder)
Run your whole workflow once per image, without loading the folder into RAM
- image
- filename
- foldername
- index
- total
- caption
The batch mode ComfyUI forgot to ship
You have a folder of 400 photos and you want to run the same workflow on every one of them - upscale them, img2img them, caption them, whatever. ComfyUI's built-in tools don't love this. A regular queue runs the graph once with the same inputs every time, and a batch-as-list approach loads every image into memory at once.
Load Image Serially (from Folder) is the middle path, and it's the pack author's own favorite node here. It keeps exactly one image in memory and queues an independent ComfyUI prompt for every file in the folder - so the whole graph downstream of it runs once per image, as if you'd clicked Queue Prompt that many times.
How the queueing works
The node has a folder input (a path string) plus two hidden helpers you never touch: filename and queue_folder_submission, which the frontend fills in for you. The one visible input beyond the path is show_preview, which decides whether each run also writes a preview to ComfyUI/temp/.
The button that matters is Queue Folder, added by the pack's frontend JS alongside a Select Folder button. Click it and the pack:
- lists the supported images in the folder and asks for confirmation - "Queue N images as separate prompts?";
- loops through the files, setting
filenameto each one and flippingqueue_folder_submissionon; - calls ComfyUI's own queue API once per image, so each submission is a full, independent run.
You get image, plus filename, foldername, index (1-based position), and total. That's the part that makes this node worth it: wire filename or index into a Save Image node's prefix and every output is named after its source instead of a pile of ComfyUI_00042_.png collisions.
Files aren't sorted and subfolders aren't scanned - order is whatever the filesystem hands back, so if sequence matters, name your files so alphabetical order is the order you want.
Why a regular Queue Prompt "doesn't work"
This is the gotcha that confuses everyone once. The node has to stay valid for ComfyUI's eager validation, and the graph still has to run when you aren't in folder mode - for example when a switch node evaluates both branches. So with queue_folder_submission off (normal queueing), load returns a harmless 1×1 dummy image and empty strings instead of an error. That's not a bug; it's the node saying "use Queue Folder." Plug in a folder, hit Queue Prompt, and get a 1-pixel image out? You're looking at the inactive branch. Switch to Queue Folder.
Install and gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/acgc99/ComfyUI-acgc99-pack.git
or find ComfyUI-acgc99-pack in ComfyUI Manager. Restart ComfyUI and hard-reload the browser tab, or the buttons won't appear. No extra Python dependencies, no models, no external services - just a loop around ComfyUI's own queue.
Two more things that bite:
- Wait for the queue to drain. The button refuses to run while a submission is in flight, and the frontend clears the hidden
filename/queue_folder_submissionvalues when you load a workflow so a normal Queue Prompt can't replay a stale file. If you loaded a workflow that was saved mid-queue, run once to be sure. - Read the confirmation dialog. It shows the file count up front. If it says 0, your images aren't directly inside that folder, or they're not in the supported set.
If you've been Googling "ComfyUI process a folder of images" and finding ten different batch packs, this is the lightweight one: no dependencies, no models, just one button that turns a folder into a queue. For folders that fit comfortably in RAM, Load Image (from Any Folder) is simpler; the moment memory matters, this is the node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| folder | STRING | — | |
| filename | STRING | — | |
| queue_folder_submission | BOOLEAN | false | — |
| show_preview | BOOLEAN | false | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| filename | STRING | — |
| foldername | STRING | — |
| index | INT | — |
| total | INT | — |
| caption | STRING | — |