Load Image Batch From Zip
Stop unzipping by hand — load a whole folder of images in one node
- image
- mask
- count
Every ComfyUI user has the same breaking point: you've got 200 reference images, an img2img batch to run, or a dataset you're about to train on, and the only way in is dragging files in one at a time or poking around with the built-in Load Image node. Load Image Batch From Zip is the small node that fixes that exact annoyance. Drop a .zip into ComfyUI's input folder, point the node at it, and out comes a proper batched IMAGE tensor plus a mask - no extraction step, no twenty Load Image nodes, no naming a folder and praying the load order makes sense.
It ships in the ComfyUI-ZipBatchLoader pack, a small single-maintainer project from Charlweed. Don't expect fame: it's a utility, not a headline feature, and that's exactly why you want it in your back pocket for batch work.
How it works
The whole thing is one node with a refreshingly simple job. When the node opens, it scans ComfyUI/input for .zip files and fills the dropdown. When you run it, it opens the archive entirely in memory - no extraction to disk - filters to .png, .jpg, and .jpeg, skips __MACOSX/ junk and hidden dotfiles, and sorts everything alphabetically by filename. Each image becomes two tensors: the RGB version normalized to 0–1 (IMAGE, shape [B, H, W, 3]) and a grayscale version (MASK, shape [B, H, W]), all stacked into one batch. Zero-padded names like 000_ref.png, 010_ref.png, 020_ref.png give you a predictable order you can actually reason about.
The mechanism matters for two reasons. First, it's memory-hungry by design: the whole archive gets pulled into RAM as tensors, so a multi-gigabyte zip of 4K stills can hurt on a small machine. Second, the mask is not an alpha channel - it's just the grayscale conversion of each image. Don't wire it into an inpaint pipeline expecting transparency; it's there so mask-based conditioning has something to chew on.
The inputs and outputs that matter
Only two inputs, and you'll touch both:
zip_file- the dropdown. It lists every.zipin your ComfyUIinputdirectory. There's no file browser; if your zip isn't there, it can't see it.heterogeneous_dimensions- defaultFalse. Leave it off and every image must be the same size or the node throws aValueErrornaming the offender. Flip it on and mismatched images get silently skipped with a warning instead. For training data that's a lifesaver; for strict batches, keep it off so nothing sneaks through wrong-sized.
Outputs: image (the IMAGE batch), mask (the MASK batch), and count (an INT - handy for confirming nothing got dropped, or as a loop bound). The image output plugs straight into a VAEEncode for img2img-style batches, into Save Image for a bulk export, or anywhere else a normal image wire goes. That's the whole point: it emits standard ComfyUI types, so it plays with everything.
Installing it
Boring and painless, which is good. No models to download, no CUDA surprises - dependencies are just torch, Pillow, and numpy, which you already have.
- ComfyUI Manager: search for
ZipBatchLoader(orComfyUI-ZipBatchLoader) in the Custom Nodes Manager and hit install, then restart. - Comfy CLI:
comfy node install ComfyUI-ZipBatchLoader - Manual:
then restart ComfyUI. It appears in the node menu as Load Image Batch From Zip under the image category.cd ComfyUI/custom_nodes git clone https://github.com/Charlweed/ComfyUI-ZipBatchLoader.git
Where people get burned
Three things trip up new users, all of them visible in the source so you can trust them:
- The dimension error. Most common by far. Mixed-resolution zips fail loudly with
heterogeneous_dimensionsoff - resize your images before zipping, or accept the skip behavior. - The dropdown is stale. The file list is populated when the node loads, so if you drop a new zip in
input, refresh the workflow or restart before it shows up. - The zip must live in
input. It won't find your archive sitting on the Desktop, and it errors withFileNotFoundErrorif the file vanishes between selection and run.
For a "load a bunch of images" problem, this is the one I'd reach for: one node, predictable order, standard outputs, and zero setup beyond a zip. You'll stop extracting archives by hand before the week is out.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| zip_file | COMBO | 0 options: | |
| heterogeneous_dimensions | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| count | INT | — |