🔶 Load Image Batch
Step through a folder of images one per queue run
- restart
- activ_frame2index
- Info
- IMAGE
Point this node at a folder and it loads one image from it per queue run, advancing the index automatically. It's the entry point for the two workflows the README calls out directly: img2img batch processing (each generation uses the next source image) and ControlNet batch driving (feeding a folder of pose/depth/canny frames into a ControlNet chain, one per output frame).
What it does
path is a plain string - the folder to read images from. index (INT, default 1, min 1, max 150000) is which image in that folder to load; on its own, without anything overriding it, it's a static number you'd normally leave alone and let something else drive. Outputs are Info (a status string) and IMAGE - the loaded frame.
The two optional inputs are where this node earns its place in a bigger animation setup. restart (RESTART type) connects from the restarter node, snapping the internal position back when you bump the restarter's Version - the same reset mechanism used across the pack's stateful nodes. activ_frame2index (ACTIV_FRAME type) connects from the restarter's ACTIV_FRAME output too, and this is the more interesting one: instead of this node incrementing its own index independently, it can be driven directly by the same frame counter that's telling the img2video/txt2video KSamplers which frame they're on, so the image you load and the frame the sampler is generating stay in sync rather than potentially drifting apart over a long sequence.
Why you'd reach for it
If you're building a ControlNet-driven animation - a folder of pre-extracted pose or depth frames, one per output frame - this is how those frames get into the graph without forty individual Load Image nodes. Same story for img2img batches: point it at a folder of source stills and let it step through them across a queued batch run. If you're just loading one reference image once, use the stock Load Image node instead; this one's entire value is the auto-advancing index.
Installing it
Through ComfyUI Manager: search "Chaosaiart-Nodes," or "Install via Git URL" with https://github.com/chaosaiart/Chaosaiart-Nodes, then restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/chaosaiart/Chaosaiart-Nodes, restart ComfyUI. Linux needs pip install opencv-python and pip install tqdm (venv active first) - image handling in this pack leans on OpenCV, and skipping this step is the most common install failure for the pack as a whole. Windows has a bundled Install_windows script. No model downloads.
Troubleshooting
An empty or broken IMAGE output almost always means the path string is wrong - double-check it's a path the ComfyUI process itself can see (absolute paths are safer than relative ones if you're not sure where ComfyUI's working directory is), and that the folder actually contains images at the index you're requesting. If the node keeps loading the same image across every queue run instead of advancing, you're probably relying on index alone without a batch count set - bump "Batch count" in ComfyUI's Extra Options so it actually queues multiple runs, or wire in activ_frame2index from a restarter if you want the frame counter driving it instead. And if this node and your animation KSampler's frame count feel out of sync, that mismatch is exactly what wiring both to the same restarter's ACTIV_FRAME output is meant to prevent - check both are actually connected to it rather than one relying on its own internal index.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 11–150000 | — |
| path | STRING | — | |
| restartopt | RESTART | — | |
| activ_frame2indexopt | ACTIV_FRAME | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Info | STRING | — |
| IMAGE | IMAGE | — |