Load Image Sequence From Path
Load a whole folder of frames as one batch — no copying, no file picker
- IMAGE
- MASK
Ever found yourself feeding fifty frames into ComfyUI one at a time through the file picker, because the batch node you tried either buried them in your input/ folder or silently mangled the dimensions? Load Image Sequence From Path is the version that just works: type a folder path, and every image inside comes out the other side as a single IMAGE batch, straight from where the files already live. Nothing gets copied. If the folder is a "sequence" in the loosest sense - raw frames, a training batch, the renders from an animation pass - this is the node you point at it.
It's the second node in dreevelle/ComfyUI-LoadImagePath, and it covers exactly what the pack's main node deliberately doesn't. Its sibling, Load Image From Path, copies a single file into your input/ folder so the mask editor keeps working. This one reads files in place, which is what you want when the folder is huge and you're not editing masks - you're batching.
How it works
The node scans the folder, keeps files whose extensions ComfyUI itself recognizes as images (png, jpg, jpeg, webp, gif, bmp, tif, tiff, avif, heic - but not exr, jxl, tga, or psd), sorts them by filename, and decodes them through PyAV in parallel. PyAV releases the GIL while decoding, so the threads knob actually scales with your cores. The pack's own benchmark: 24 PNGs at 1920×1080, 69 MiB total, goes from ~1.0s on one thread to ~0.34s on the default eight - about 3× faster, bit-identical output. Point it at a single animated file instead and it loads all the frames; that's a handy way to drag a GIF or animated WebP apart into a sequence without any video nodes.
The inputs that matter
You'll live on path and occasionally touch two of the selectors:
path- folder or single animated file. Surrounding quotes are stripped,file://prefixes and a leading~are both accepted. Subfolders are not searched, so point it at the exact folder.start_index- skip this many images from the start.select_every_nth- load every Nth. 2 gives you every other frame, which is the classic way to halve a training set.count- cap the load. 0 means all.threads- decoder parallelism; 0 auto-selectsmin(8, CPU count). Leave it alone until a load feels slow.
The order is start, then stride, then cap - the same order VideoHelperSuite uses, so anyone migrating from VHS's Load Images (Path) gets the same frames from the same three numbers (skip_first_images → start_index, select_every_nth stays, image_load_cap → count).
Outputs are IMAGE and MASK, the same pair the built-in loader emits. No alpha anywhere in the folder gets you the standard [B, 64, 64] block of zeros that every downstream node reads as "no mask"; alpha files produce 1.0 - alpha. Wire the IMAGE into a KSampler, a LatentFromBatch, or Get Image Size (which reports the batch size - VHS's old frame_count output).
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/dreevelle/ComfyUI-LoadImagePath
Then restart ComfyUI. ComfyUI Manager users can just search "LoadImagePath". There are no extra dependencies - the PyAV, torch, numpy, and Pillow it uses all ship with ComfyUI core, and the pyproject.toml confirms an empty dependency list. No model downloads, no requirements.txt.
Where people get burned
- Zero-pad your filenames. Sorting is lexicographic, so
frame_0010.pngfollowsframe_0009.png- butframe10.pngsorts beforeframe9.png. If your sequence isn't zero-padded, the order is wrong and it won't be obvious. - Mixed sizes raise, loudly. VHS silently lanczos-resized and centre-cropped mismatched frames; this node throws an error naming both files and both dimensions instead. That's a feature - move the odd file out or narrow the selection with
start_index/count/select_every_nth. - Memory. Everything is float32, so 500 frames at 1920×1080 is roughly 12 GB of VRAM. A folder-load doesn't make that problem; it just doesn't hide it.
- Cache invalidation is by size + mtime, not content. Editing a frame and saving it back with the same size and timestamp won't be noticed - touch the file to force a reload.
- Mixed alpha in one folder can't match the built-in loader's shapes, so non-alpha files contribute image-sized zeros. Nothing gets masked either way; it's just the one case where bit-for-bit equivalence is impossible.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Path to a folder of images, or to a single animated file. A folder loads every image inside it, sorted by filename, as one batch. Subfolders are not searched. A file loads all of its frames. Surrounding quotes, a file:// prefix and a leading ~ are accepted. Reads are confined to ComfyUI's own folders unless the server was started with COMFYUI_LOADIMAGEPATH_ROOTS listing the others. | |
| start_index | INT | 00–9007199254740991 | Skip this many images from the start — or this many frames, if the path is a single animated file. |
| count | INT | 00–9007199254740991 | How many images to load. 0 = all of them. Applied after start_index and select_every_nth. |
| select_every_nth | INT | 11–9007199254740991 | Load only every Nth image. 1 = every one, 2 = every other, and so on. Applied after start_index. |
| threads | INT | 00–64 | Decoder threads. 0 = auto (min(8, CPU count)). Decoding runs through PyAV, which releases the GIL, so this scales with cores. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |