Nodes/ComfyUI-FrameIO/Batch Load Image Sequence
ComfyUI Node

Batch Load Image Sequence

Load 600 numbered frames without touching a filename — Batch Load Image Sequence

By room3dev·Created 8 months ago·Updated 7 months ago· 0
Batch Load Image Sequence
    • IMAGE
    • INT
    path_pattern./frame{:06d}.webp
    start_index0
    frame_count16
    ignore_missing_imagesfalse

    If you've ever tried to feed a rendered frame sequence back into ComfyUI, you know the pain: either you drag in 600 PNGs one by one, or you cobble together a LoadImage node and pray the folder sorts the way you want. This node fixes the second half. It loads a whole run of numbered frames from disk from a single pattern string, returns them as one IMAGE batch, and tells you how many it found. It's from the ComfyUI-FrameIO pack, which exists to make frame storage and reuse tolerable for long video workflows.

    The core idea is a Python str.format pattern instead of a filename list. The default is ./frame{:06d}.webp, which means "a 6-digit, zero-padded number goes here" - so it matches frame000000.webp, frame000001.webp, and so on. You give it start_index and frame_count, it resolves every path, loads them, and concatenates them into a single batched tensor. The loading itself runs through a thread pool, so a few hundred small frames come in noticeably faster than a naive loop, and there's no CPU-bound NumPy round-trip per frame - the code goes straight from the PIL image to a float tensor.

    The inputs that matter:

    • path_pattern - the format string. {:06d} is zero-padded 6 digits; use {:05d} if your files are 5 digits. This is the field that burns people, because if your renderer writes frame_00001.png with an underscore, you need the pattern to match it exactly.
    • start_index - where to begin (default 0).
    • frame_count - how many to load. Default 16, but set it to 0 for auto-detect mode: it walks forward from start_index loading contiguous frames until one is missing, and stops. That's the mode you want when you don't know the render length in advance.
    • ignore_missing_images - only applies in fixed-count mode. false (default) raises a FileNotFoundError naming the missing path; true quietly skips gaps.

    Outputs are IMAGE (the batch, wired into whatever you're post-processing) and an INT count you can feed into a text or progress node.

    Two gotchas worth knowing before you wire this up. First, auto-detect stops at the first gap - a single dropped frame 300 frames in silently truncates the load. If you're loading a partial render, that's exactly the behavior you want; if you're debugging, it's easy to misread. Second, relative paths resolve against whatever directory ComfyUI was launched from, which is usually the ComfyUI root - not the output folder. If you're confused about why nothing loads, use an absolute path or run the saver first and pass its output in (that's what the list loader in this pack is for).

    Installing is the easy part: open ComfyUI Manager, search "ComfyUI-FrameIO", install, restart. Or the manual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/room3dev/ComfyUI-FrameIO
    

    Restart ComfyUI and you'll find it under the FrameIO category. Dependencies are just pillow and numpy - no models to download, nothing heavy. This is one of the rare custom nodes that's more about ordering your disk than about the GPU, and that's fine: when a 600-frame Wan or Hunyuan pass comes out of the sampler, this is the node that gets it back in when you need it.

    CategoryFrameIO

    Inputs (4)

    NameTypeDefaultDescription
    path_patternSTRING./frame{:06d}.webp
    start_indexINT0
    frame_countINT16
    ignore_missing_imagesCOMBOfalse2 options: false, true

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    INTINT