Nodes/SaltAI-Open-Resources/Load Images from ZIP
ComfyUI Node

Load Images from ZIP

Batch-load a whole folder as one asset

By get-salt-AI·Created 2 years ago·Updated 2 years ago· 84
Load Images from ZIP
    • images
    path
    resize_images_to_firsttrue

    Uploading fifty individual images to a ComfyUI workflow, one LoadImage node at a time, is exactly the kind of tedium that makes people stop batching entirely. SaltLoadImageZip skips it: zip your folder once, point this node at the archive, get back a full IMAGE batch in a single node.

    What it does

    Two inputs: path, a string pointing at the .zip file on the machine actually running the workflow, and resize_images_to_first (boolean, default true). ComfyUI's IMAGE batches need every image to share the same tensor shape - you can't batch a 512×512 and a 768×1024 together as-is - so if your zip contains mixed sizes, this toggle resizes everything to match whatever the first image in the archive happens to be. Turn it off only if you already know every image in your zip is the same dimensions, or if you're deliberately handling resizing yourself downstream. The single output, images, is the resulting batch.

    Where it's genuinely useful

    Anywhere you're processing a dataset rather than a single generation: running a batch of reference photos through a color-transfer or masking pipeline, feeding a folder of frames into an animation-adjacent workflow, or just moving a dataset from somewhere else (a HuggingFace dataset export, a CivArchive download, a folder you scraped together) into ComfyUI without a manual per-file upload step. On a hosted/serverless platform like comfy.icu specifically, this matters more than it might locally - uploading one zip as a single asset is a much better fit for how remote execution handles inputs than uploading dozens of loose files.

    Installing it

    ComfyUI Manager: search SaltAI-Open-Resources. Manual install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/get-salt-AI/SaltAI
    

    Restart ComfyUI. No extra dependencies beyond standard zip handling, which is built into Python.

    Common issues

    The most common failure is path pointing somewhere the executor can't see - this needs to be a path on the machine actually running the workflow, not a path on your local desktop if you're running remotely. On a hosted executor, make sure the zip is uploaded as an asset first and reference that asset's actual server-side path. The second common issue is mixed image sizes with resize_images_to_first turned off - you'll get a batching error downstream rather than a clean failure at this node, since the shape mismatch only becomes a problem once something tries to stack the images into one tensor. If you hit that, either turn the toggle back on or make sure your source images are already uniform before you zip them up.

    CategorySALT/Image/Loaders

    Inputs (2)

    NameTypeDefaultDescription
    pathSTRING
    resize_images_to_firstBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    imagesIMAGE