π Load Image Sequence
Load images one at a time from a folder, without blowing up your RAM
- image
- filename
- txt_filename
- current_index
- total_images
ComfyUI's standard LoadImage needs a specific file, and LoadImageBatch tries to hold the whole folder in memory at once. When you're feeding a few hundred frames of an animation loop or a dataset through a pipeline, that's either tedious or a RAM disaster. LoadImageSequence is the middle path: it walks a folder, remembers where it left off, and hands you the next image every time the graph runs - one at a time. The README's pitch is "low memory usage vs batch loading," and that's the whole point of the node.
How it works
Give it a folder_path and it scans for image files (extensions default to jpg,jpeg,png,bmp,tiff,webp, overridable via file_extensions). Sort them - alphabetical, date_modified, date_created, or file_size - then track a per-folder position in memory, keyed by a hash of the folder path. Every execution loads the current image, then increments. Because state lives in the node instance, an empty run in the same workflow won't double-advance (there's a 100ms dedupe so re-executions inside one graph run reuse the same image). reset_sequence (BOOLEAN) forces the counter back to zero when you flip it. loop_sequence (default on) wraps back to the start; with it off the node parks on the last image.
There's a genuinely useful random mode too: random_image picks randomly, and no_repeats (default on) ensures every image is used once before any repeats. seed makes the random draw reproducible (0 = true random). One quirk: the seed tooltip is in German ("Nur bei random_image: fester Seed = reproduzierbare Auswahl") - the author's documentation isn't perfectly translated, which tells you something about the support level to expect.
Outputs - the useful ones
image(IMAGE) - the loaded frame.filename(STRING) - the current file name.txt_filename(STRING) - this one's the hidden gem: if a sidecar.txtcaption file exists next to the image, this gives you its filename, so you can pull matching captions into a training or captioning workflow. That's the dataset sidecar convention in action.current_index(INT) andtotal_images(INT) - progress for logic or display.
Where it fits
Frame-by-frame animation, feeding a dataset folder into a captioning or img2img pass, stepping through a reference set one at a time. Anywhere the alternative is "load all 500 images into VRAM." It's not a video node - it's the patient, memory-cheap way to walk a folder over repeated executions.
Install and caveats
Part of DenRakEiw_Nodes: ComfyUI Manager β search "DenRakEiw Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DenRakEiw/DenRakEiw_Nodes
cd DenRakEiw_Nodes && pip install -r requirements.txt
then restart. No heavy deps - this one's plain Pillow/PIL.
Caveats: state is in-memory, so restarting ComfyUI resets the position (the sequence starts over - flip reset_sequence if that's ever a problem, or just accept it). The folder path is a raw string, so it must exist and be readable; the node raises a clear "Folder path does not exist" error if not. And the pair-advance dedupe relies on a timing threshold, so pathological rapid re-executions can occasionally skip - if you see a frame jump, that's it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | β | |
| reset_sequence | BOOLEAN | false | β |
| file_extensionsopt | STRING | jpg,jpeg,png,bmp,tiff,webp | β |
| sort_methodopt | COMBO | alphabetical | 4 options: alphabetical, date_modified, date_created, file_size |
| loop_sequenceopt | BOOLEAN | true | β |
| random_imageopt | BOOLEAN | false | Instead of going in order, load a random image from the folder |
| no_repeatsopt | BOOLEAN | true | random_image only: every image is used once before any repeats. Off means a free draw each time, so duplicates are possible |
| seedopt | INT | 00β18446744073709550000 | Nur bei random_image: fester Seed = reproduzierbare Auswahl. 0 = echter Zufall |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| filename | STRING | β |
| txt_filename | STRING | β |
| current_index | INT | β |
| total_images | INT | β |