Nodes/Various ComfyUI Nodes by Type/Batch Load Image Sequence
ComfyUI Node

Batch Load Image Sequence

Load numbered frames as an image batch

By jamesWalker55·Created 3 years ago·Updated about a year ago· 218
Batch Load Image Sequence
    • IMAGE
    path_pattern./frame{:06d}.png
    start_index0
    frame_count16
    ignore_missing_imagesfalse

    If you've got a folder of numbered frames - frame000000.png, frame000001.png, and so on, ripped from a video or rendered somewhere else - JWLoadImageSequence reads a run of them off disk and loads them as a single IMAGE batch you can push through a video workflow. This is the front door for frame-by-frame vid2vid: get your source video into frames, load them here, and now every frame is on one wire ready for AnimateDiff, ControlNet, or a straight img2img pass.

    It's one of the reasons this pack ends up installed on so many machines - plenty of AnimateDiff and video-to-video workflows lean on it to pull frames in, so it rides along as a dependency of workflows people download. If you found it sitting in a graph you didn't build, this is almost certainly why.

    How it works

    You give it a filename pattern with a number placeholder, a starting number, and how many frames to grab. It walks the sequence - substituting the index into the pattern for each frame - and stacks the images into a batch. The default pattern ./frame{:06d}.png means "frame + a 6-digit zero-padded number + .png", so index 0 is frame000000.png, index 1 is frame000001.png. Match the pattern to how your frames are actually named.

    The inputs and outputs that matter

    • path_pattern (STRING) - the filename pattern with a {:06d}-style placeholder, default ./frame{:06d}.png. Adjust the digit count and folder to match your files.
    • start_index (INT, default 0) - which frame number to begin at.
    • frame_count (INT, default 16) - how many frames to load. 16 is a nod to typical AnimateDiff context lengths; raise it for longer clips.
    • ignore_missing_images (enum: false / true) - if a frame in the range is missing, false errors out, true skips past the gap. Handy when a sequence has holes.
    • Output: IMAGE - the frames as a batch.

    How to install it

    Part of jamesWalker55/comfyui-various, a pack of small utility nodes.

    • ComfyUI Manager: search "Various ComfyUI Nodes by Type", install, restart. Red node in a downloaded workflow? Install Missing Custom Nodes.
    • Manually:
      cd ComfyUI/custom_nodes
      git clone https://github.com/jamesWalker55/comfyui-various
      
      Restart afterward. No models, no dependencies.

    Under the jamesWalker55 category after restart.

    Common issues

    • The pattern doesn't match my filenames. This is the number-one failure. If your frames are img_0001.jpg you can't use the default ./frame{:06d}.png - the prefix, the digit count ({:04d} vs {:06d}), and the extension all have to line up exactly. Rename your frames or edit the pattern to fit.
    • It errors partway through the range. A missing frame with ignore_missing_images on false stops the load. Set it to true to skip gaps, or check that your start_index and frame_count stay within the frames that actually exist.
    • Paths on a cloud/serverless host. The pattern points at the server's filesystem, and ./frame... resolves against ComfyUI's working directory, not your computer. On a hosted setup you need the frames to actually be on that machine (uploaded, or produced earlier in the pipeline) - a local path from your desktop won't resolve. Loading many high-res frames also eats VRAM/RAM fast, so keep batches sane.
    • Node is red / missing. The pack isn't installed. Install via Manager or clone the repo, then restart.

    Its partner is JWSaveImageSequence, which writes a processed batch back out as numbered frames - load, transform, save, then encode to video. That round trip is the backbone of a lot of frame-based pipelines.

    CategoryjamesWalker55

    Inputs (4)

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

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE