YG Local ZIP Image Loader
YG Local ZIP Image Loader reads from disk
- image
- mask
- folder_name
- filename
- current_index
- total_count
- is_last
The sibling of YG ZIP Image Loader, minus the file-picker ceremony. YG Local ZIP Image Loader reads a ZIP straight from ComfyUI's input folder - you drop the archive in, pick it from a dropdown, and it extracts and feeds your pipeline one image per queue run. Same "batch without OOM" idea, but built for the case where the files already live on the server instead of in your browser.
How it works
Where the regular ZIP loader needs a browser upload, this one just scans ComfyUI/input/ for .zip files and presents them as a dropdown (zip_file). When you select one and run, it extracts to input/yg_zip_jobs/<job_id>/ - preserving the archive's sub-folder structure - and walks it for images (PNG/JPG/WEBP/TIFF/BMP). Then it's the same machinery as its sibling: one image per queue run, advancing an index, with is_last flipping true at the end. In fact it literally shares the loader's in-memory state, so the two nodes interoperate seamlessly.
There's an "Extract Selected ZIP" button in the UI to force the extraction up front, but the node also auto-extracts on first run if you forget - so the only real prerequisite is that the ZIP file exists in the input folder. State is in memory, keyed by job_id, and the IS_CHANGED NaN trick guarantees the index advances every run.
Outputs - same contract as the other ZIP loader
imageandmask- current image, mask being inverted alpha like ComfyUI's Load Image.folder_name/filename- where the file lived inside the ZIP, so a paired saver can rebuild the same folder layout.current_index,total_count,is_last- batch bookkeeping; wireis_lastinto a YG ZIP Image Saver to auto-package the results when the batch completes.
The only inputs are zip_file (the dropdown, refreshed when you restart ComfyUI or drop a new ZIP in) and job_id. Keep job_id consistent with whatever saver you connect.
Installing it
Part of the comfyui_yg_nodes pack (MIT, "YG Custom Nodes" v1.0.4 by Mallikarjunarao Koliparthi - published to the Comfy Registry). No extra Python dependencies. Install through ComfyUI Manager (search comfyui_yg_nodes) or:
cd ComfyUI/custom_nodes
git clone https://github.com/mallikarjunaraokoliparthi/comfyui_yg_nodes.git
Restart ComfyUI; it shows up under YG Custom Nodes.
Choosing between the two ZIP loaders
Both do the same "one image per run" thing; the difference is where the ZIP comes from. Local loader: drop a file on the server, pick it from a list - better for SSH'd boxes, shared servers, or automating from a script that drops archives into input/. The regular ZIP loader: browser upload - better when you're on a remote ComfyUI and the archive is on your laptop. If you're setting up a repeatable batch pipeline where the ZIPs arrive on disk, the local version is the one you'll actually want; the upload-button one is more for one-off runs.
Watch out for the same traps as the sibling: no ZIP selected means an error, state clears on restart (re-extraction is automatic, so it's mild), and a job_id mismatch with your saver silently splits the job into two unrelated things. Otherwise this is the lower-friction half of a very handy batch pattern.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| zip_file | COMBO | 1 options: (No ZIP files in input folder) | |
| job_id | STRING | my_local_zip_job | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| folder_name | STRING | — |
| filename | STRING | — |
| current_index | INT | — |
| total_count | INT | — |
| is_last | BOOLEAN | — |