Nodes/MTB Nodes/Load Image Sequence (mtb)
ComfyUI Node Runs on cloud

Load Image Sequence (mtb)

Reading a numbered folder of frames into ComfyUI

By melMass·Created 3 years ago·Updated about a month ago· 721
Load Image Sequence (mtb)
    • image
    • mask
    • current_frame
    • total_frames
    pathvideos/####.png
    current_frame0
    range

    If you've done any work in Nuke, After Effects, or Blender, the #### in this node's default path (videos/####.png) will look familiar - it's the standard frame-number placeholder convention, where each # stands for one digit of a zero-padded frame number. videos/####.png matches videos/0001.png, videos/0002.png, and so on. This node's whole job is loading one image at a time out of that kind of numbered sequence, driven by which frame you ask for.

    The author's own note in the pack is honest about the UX: "needs improvements." It works, but it's not the most polished input node in the pack - the interaction between current_frame and range in particular is worth reading carefully before you rely on it.

    How the three modes work

    Straight from the node's own documentation:

    • current_frame set to a specific number (0 and up) loads exactly that one frame from the sequence.
    • current_frame set to -1 loads every frame matching the pattern, all at once.
    • If path contains a *, the node globs using it - useful when your filenames don't follow strict zero-padding.
    • If range is set (something like 0-10 to load frames 0 through 10), it takes over entirely and current_frame is ignored.

    Inputs and outputs that matter

    • path (default videos/####.png) - the pattern pointing at your sequence.
    • current_frame (default 0, range -1 to a very large number) - which frame to load, or -1 for "all of them."
    • range (optional, default empty) - a frame range string that overrides current_frame when set.

    Four outputs: image, mask (same as any core image loader), plus current_frame and total_frames as INTs - handy for wiring straight into a counter-driven graph, since you get back both what frame you actually loaded and how many exist in total without a separate lookup.

    Installing it

    • ComfyUI Manager - search "MTB Nodes", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/melMass/comfy_mtb, restart. A manual clone needs pip install -r requirements.txt run inside the comfy_mtb folder first.

    No models needed - it's reading files off disk. Just make sure path is relative to wherever ComfyUI expects it (typically the input directory, same as other load nodes), not an arbitrary absolute path you're assuming will resolve.

    Common issues & troubleshooting

    Nothing loads, or it errors on startup. Double-check your actual filenames match the # padding exactly - #### means exactly four digits, so a file named videos/1.png won't match it. Either rename to videos/0001.png or switch path to use a * glob instead.

    Frame count looks off, or current_frame doesn't do what you expect. Check whether range is set - if it is, current_frame is silently ignored, per the node's own documented behavior, which is an easy thing to forget after you've been tweaking range for a different test.

    Loading feels slow with current_frame = -1 on a big sequence. That's expected - pulling every frame from a folder at once is inherently heavier than loading one, and there's no lazy-loading option exposed here. For large sequences, prefer range to pull a manageable slice, or drive current_frame per-queue if you're processing one frame at a time anyway.

    Some mtb nodes fail to load at startup. Standard for this pack - check the console for [comfy_mtb] STATUS and http://127.0.0.1:8188/mtb for what didn't load. This node has no optional dependencies, so it's rarely the one missing.

    Categorymtb/IO

    Inputs (3)

    NameTypeDefaultDescription
    pathSTRINGvideos/####.png
    current_frameINT0-1–9999999
    rangeoptSTRING

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    current_frameINT
    total_framesINT