Load Image Batch from Zip
One zip in, a whole image batch out
- image_batch
- json
Load Image Batch from Zip turns a single .zip file into one stacked IMAGE batch - every image inside becomes a frame in a single tensor, sorted by filename - plus any sidecar JSON file the zip contains. It's the batch counterpart to the standard Load Image, for when you want a folder's worth of images processed as one unit.
Why you'd reach for it
Core ComfyUI loads images one at a time. If you have 40 reference frames, a contact sheet, or a folder of images you want to run through the same pipeline, the batch approach means one node instead of 40. The zip format also makes sharing a "batch" portable - drop a zipped folder plus a metadata JSON into ComfyUI's output directory, and one node loads everything. It's the natural partner to the pack's Save Image Batch to Zip for round-tripping batches.
How it works
The node resolves the filename against ComfyUI's output directory (with a path-traversal check that rejects anything outside it), then either opens it as a zip or, with loadFromFolder enabled, reads a plain directory instead. It picks out image files (png, jpg, jpeg, bmp, gif, tiff, webp), sorts them by name, loads each as RGB, and stacks them with torch.stack into a single [N, H, W, 3] batch. It also grabs the first .json file it finds (inside the zip or in the folder) and outputs its contents as a string - handy for metadata that describes the whole batch.
If nothing is found, it returns a dummy 1×64×64 black image plus "{}" rather than erroring out - which is worth knowing, because an empty batch doesn't fail loudly.
The inputs that matter
- filename - defaults to
input.zip. Relative paths resolve againstComfyUI/output. - loadFromFolder - off by default (read a zip). Flip on to read a folder of images instead.
Two outputs:
- image_batch - the stacked IMAGE tensor.
- json - the contents of the first
.jsonfile found, as a STRING.
Installing it
TinyBee pack: ComfyUI Manager → Install Custom Nodes → search "ComfyUI-TinyBee", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
Under 🐝TinyBee/Queue. Uses zipfile and PIL - both already in ComfyUI, no extra install.
Common issues
The one that bites hardest: all images in the batch must have the same dimensions, because a single tensor can't hold mixed resolutions. torch.stack will throw if your zip mixes sizes - pre-process to a uniform size first. Also remember the file lives in the output directory, not input - a "Zip file not found" usually means you put it in the wrong folder. And since the node picks only the first JSON file, a zip with multiple JSONs behaves unpredictably about which one you get. If you see a 64×64 output, that's the empty-batch dummy, not a real image - check the zip contents.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| filename | STRING | input.zip | — |
| loadFromFolder | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image_batch | IMAGE | — |
| json | STRING | — |