Nodes/ComfyUI-N-Nodes/LoadFramesFromFolder
ComfyUI Node Runs on cloud

LoadFramesFromFolder

Reload a folder of numbered PNGs as a video-ready frame batch

By Nuked88·Created 3 years ago·Updated 2 years ago· 237
LoadFramesFromFolder
    • IMAGES
    • METADATA
    folder
    fps30

    If you've ever extracted frames from a video, run some processing on them outside ComfyUI (or just want to resume a session without re-decoding the source clip), this is the node for getting them back into the graph as a batch. Point folder at a directory of sequentially-numbered PNGs - the README is specific about the naming convention: they need to be .png and named with a number, 1.png or 0001.png both work - and it loads them in order as a single IMAGES batch.

    How it works

    It's a straightforward directory scan: every PNG in folder gets read, converted to a tensor, and stacked into a batch in filename order. The second input, fps, doesn't do anything to the pixels - it's metadata. Since a folder of static images has no inherent frame rate, you tell the node what to treat them as, and that number gets carried forward in the METADATA output so anything downstream (FrameInterpolator, or the pack's own video writer) knows what frame rate it's reconstructing.

    This is the node for the "extract once, iterate many times" workflow: pull frames from a video with LoadVideo [n-suite] or SaveVideo, save them to disk, then use this node to reload that exact frame set on every subsequent run instead of paying the decode cost again.

    The outputs that matter

    Two of them: IMAGES, the loaded batch, and METADATA, the fps you set wrapped into the string format the rest of the pack's video nodes expect. Worth flagging honestly - the pack's own README describes this node returning quite a bit more (max frame width and height, a frame count, the source path, a newline-joined file list), but that's not what's actually registered under this node's current schema; it only returns the two above. If you need that extra bookkeeping, that's what LoadImageFromFolder [n-suite] - this pack's other, closely related folder loader - is for.

    Installing the pack

    • ComfyUI Manager - search "ComfyUI-N-Nodes," install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Nuked88/ComfyUI-N-Nodes.git, then restart ComfyUI.

    No model downloads or extra dependencies are needed for this one specifically - it's plain file I/O, no GPU work involved.

    Common issues & troubleshooting

    Nothing loads, or frames come out of order. Check the naming convention first - non-numeric filenames, or a mix of naming schemes in the same folder, will confuse the sort order or get skipped outright. Zero-padding (0001.png rather than 1.png) is the safer bet once you're past nine frames, since plain string sorting on unpadded numbers puts 10.png before 2.png.

    You expected width/height/count/path back and didn't get them. See above - that's LoadImageFromFolder [n-suite], not this node, whatever the README's wording suggests. Two nodes with an almost identical job, split by what they hand back: this one carries an fps-tagged METADATA object forward for a video pipeline; the other reports folder-level facts about what it found.

    Large folders are slow to load. There's no resizing or batching control here the way LoadVideo [n-suite] has - every PNG in the folder gets decoded into a full-size tensor. If you're working with a folder of high-resolution frames, downscale them on disk first, or extract at a lower size in the first place if you generated them via LoadVideo [n-suite].

    CategoryN-Suite/Video

    Inputs (2)

    NameTypeDefaultDescription
    folderSTRING
    fpsINT30

    Outputs (2)

    NameTypeDescription
    IMAGESIMAGE
    METADATASTRING