Zegami Batch Export
Drowning in 5,000 PNGs? Zegami Batch Export turns the pile into a searchable gallery
- images
- video
- images
- upload_status
ComfyUI is great at making you 5,000 variations of the same idea. It is terrible at helping you do anything with them. You run your seed/sampler/CFG grid, and three hours later you're alt-tabbing through a folder of near-identical PNGs, hunting for the one good hand. Zegami Batch Export is the node that answers "…and now what?" Drop it onto any workflow and every output lands in a Zegami collection: a filterable visual grid with similarity search and UMAP clustering. Surface your best 50 from 5,000, audit a LoRA training set for near-duplicates, or hand the client a shareable gallery.
Be honest about what this is, though. Zegami is a data-visualization company, and this is their ComfyUI front door - the node uploads to their SaaS platform, where the actual magic lives. It's a commercial integration, not a community passion project, and it has basically zero Reddit footprint. That means you need a Zegami account and API key to get value out of it. It's MIT-licensed and open source, so the uploader side is all there to read.
How it works
The design priority, straight from the source: a Zegami failure must never break your generation. Per batch the node encodes media locally first - PNGs per image, an MP4 via the ffmpeg system binary for video - then builds a zip with a metadata.csv and enqueues the upload on a background thread so your graph isn't blocked. It also captures the full prompt graph and workflow JSON as one blob, so Zegami's Calculated Columns → "From JSON path" can turn prompt.6.inputs.seed into a Seed column with one click - no per-node-type maintenance.
The fail-soft behavior is genuinely well thought out. No API key? It saves locally and returns an error status - generation completes. Network hiccup? Retry with backoff, then a .zegami-pending sidecar. Bad collection? Clear error, no lost image. Video encode fails? It uploads the first frame as a still instead. The file is never the casualty.
The inputs that matter
You mostly set three things:
images- the primary path. A standard ComfyUI IMAGE batch; each item becomes a separate still.video- a frames tensor[frames,h,w,c]from Wan/Hunyuan/LTX/Mochi, or a VHS_VIDEO passthrough, encoded to one MP4.- Target collection - three ways in: the
collection_pickerdropdown (needs an ambient key set before the graph loads), a literalcollection_id, orcollection_name, which creates or reuses by name.collection_idwins if both are set. Creating a new one needs an account- or workspace-scoped key.
The rest: tags/notes attach to every output (key=value tags become their own columns), fps defaults to 16 for video, and enabled toggles uploads off while you iterate. api_key_override and endpoint_override are last-resort fallbacks; you shouldn't need them.
Outputs are images - a pass-through, so the node sits inline before a SaveImage - and upload_status, a JSON string you can feed into a notification node.
Install
ComfyUI Manager, search "Zegami", install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/zegami/comfyui-zegami
pip install -r comfyui-zegami/requirements.txt # just `requests`
No model downloads - this isn't running anything, it's shipping your output somewhere. Video export needs ffmpeg as a system binary on your PATH, not a pip package.
Authentication
Create a collection-scoped API key in Zegami (Collection → Settings → API access). It can only write to that one collection, so it's safe in a shared workflow file. Priority order:
ZEGAMI_API_KEYenvironment variable (recommended)~/.zegami/config.jsonwith{ "api_key": "zeg_…", "endpoint": "https://…" }- the node's
api_key_overrideinput
The key is never read from or written into the workflow JSON, so published workflows stay credential-free.
Where people get burned
Video is the honest weak spot. Grid thumbnails, badges, and duration columns work, but full in-app video playback isn't there yet - the zip-ingest path doesn't populate the collection's raw_assets/ directory, so the original MP4 isn't served for the hover preview or inspector. The README owns this; plan for stills-first on video workflows.
The other classic: "my new image isn't showing up." The node salts every run with a timestamp plus a short UUID so separate generations accumulate as new tiles instead of overwriting each other. If you see stale images, it's almost always an upload failure - check the console for the [zegami] export → line (it fingerprints the key and endpoint in use) and look for .zegami-pending sidecars in ComfyUI/output/.
One quirk: the collection_picker dropdown only sees collections when an ambient key is set before the graph loads, and a collection-scoped key returns a trimmed list. Empty dropdown? Set ZEGAMI_API_KEY and reload - or just type the name into collection_name.
If your workflow is generate-bulk-then-pick-winners, Zegami's grid beats a folder of PNGs. Just know the polish (video playback especially) is still catching up.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| imagesopt | IMAGE | — | |
| videoopt | VIDEO | — | |
| collection_pickeropt | COMBO | 1 options: | |
| collection_idopt | STRING | — | |
| collection_nameopt | STRING | — | |
| tagsopt | STRING | — | |
| notesopt | STRING | — | |
| fpsopt | INT | 161–120 | — |
| api_key_overrideopt | STRING | — | |
| endpoint_overrideopt | STRING | — | |
| enabledopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| upload_status | STRING | — |