Nodes/Egregora Frames Animation Nodes for ComfyUI/Advanced Batch Loader (Dir/ZIP/URL)
ComfyUI Node

Advanced Batch Loader (Dir/ZIP/URL)

Feed a folder, a ZIP, or a URL full of frames into one IMAGE batch

By lucasgattas·Created 11 months ago·Updated 7 months ago· 2
Advanced Batch Loader (Dir/ZIP/URL)
    • images
    • frame_count
    source_type
    path
    file_filterpng,jpg,jpeg,webp
    sort_method
    max_frames0
    frame_step1
    random_seed0

    ComfyUI's stock Load Image is a one-at-a-time affair: pick a file, get a tensor. That's fine for a reference photo, useless when your "reference" is 300 frames you dumped from a video. Advanced Batch Loader is the front door of the Egregora Frames pack for exactly that job - point it at a folder, a ZIP, or a URL of a ZIP, and it hands you the whole sequence as a single IMAGE batch plus a frame count.

    It comes from the same small, self-published family of packs by lucasgattas (he posts on Reddit as mrgattax). Nothing fancy, but if you're doing frame-sequence work - sprite sheets, frame dumps, project folders of render passes - this is the load-all-of-it node you'd otherwise hack together with a dozen Load Image nodes and a batch merge.

    How it works

    Pick source_type (directory / zip_file / zip_url), type a path, and the node reads every file matching file_filter (default png,jpg,jpeg,webp), sorted by sort_method (alphabetical / random / modified_date). frame_step grabs every Nth frame - useful for thinning a dense sequence - and max_frames caps the batch (0 = unlimited, max 10000).

    Two implementation details worth knowing. For a directory, it only looks at the top level - files in subfolders are ignored. For a ZIP it extracts to a temp folder and loads recursively, so nested folders inside the archive do get picked up. Either way the frames get converted to float RGB and stacked into one tensor, ready to plug into a KSampler batch, an upscaler, or the pack's own Batch Animation Processor.

    The inputs that matter

    • source_type + path - the whole job. zip_url needs the requests library, which is in the pack's requirements, so it's there if you install normally.
    • sort_method - alphabetical is your safe default for frame sequences (filenames usually carry the order). random shuffles with a seed; modified_date is only meaningful for a real directory.
    • max_frames - set it if you're feeding a sampler with a VRAM budget. Loading 10k frames into one batch is a great way to discover yours.
    • random_seed (optional) - reproducibility for the random sort.

    Outputs

    • images (IMAGE) - the stacked batch. Wire it into whatever wants a batch.
    • frame_count (INT) - how many frames made it in. Handy for echoing into a text node or a condition.

    Install

    Shared by all five nodes in this pack. Easiest is ComfyUI Manager → search "Egregora Frames Animation" → install → restart. Manual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lucasgattas/ComfyUI-Egregora-Frames-Animation-Nodes.git
    cd ComfyUI-Egregora-Frames-Animation-Nodes
    pip install -r requirements.txt
    

    Then restart ComfyUI. The deps are all pip-installable (numpy, Pillow, opencv-python, imageio, imageio-ffmpeg, requests) - no model downloads needed for this node.

    Where people get burned

    • "No images found" - almost always a file_filter mismatch (you're feeding .tiff files with the default filter) or a wrong path. ComfyUI paths are relative to wherever you launched it, which is a classic source of confusion.
    • modified_date sorting on ZIP loads is a lie - extracted temp files all get fresh timestamps, so the order is effectively whatever extraction produced. Use alphabetical.
    • Subfolders in a directory silently don't load. That's not a bug report waiting to happen; it's just how the glob works. Point the path at the folder that directly holds the frames, or ZIP them.
    CategoryEgregora/animation

    Inputs (7)

    NameTypeDefaultDescription
    source_typeCOMBO3 options: directory, zip_file, zip_url
    pathSTRING
    file_filterSTRINGpng,jpg,jpeg,webp
    sort_methodCOMBO3 options: alphabetical, random, modified_date
    max_framesINT00–10000
    frame_stepINT11–100
    random_seedoptINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    imagesIMAGE
    frame_countINT