Agate Save Image
The PNG that admits an AI made it
- images
ComfyUI's stock Save Image is fine plumbing and the wrong tool for exactly one job: writing Agate's provenance fields. If you want a PNG that says, in the same words Agate's Python packages use, that a machine made it and which release did, this is the node you drop at the end of the graph.
Why it exists
A normal ComfyUI save already puts stuff in the file - the workflow and prompt text chunks that make drag-and-drop workflow reloading work. Agate adds four more text entries, plain and un-JSON'd: ai_generated = true, generator = Agate Preview 003 (LogoLabs), model = Logolabs/agate-preview-003, and watermark naming the payload (AGATE003). Something like agate.detect_watermark() reads an Agate file and a ComfyUI-Agate file identically.
That's transparency marking, not legal decoration. The EU AI Act's Article 50(2) - machine-readable marking of synthetic output, applying from 2 August 2026, with a grace period to 2 December 2026 for systems already on the market - is the reason a lab ships this at all. It's also just good bookkeeping: the metadata is the payload, not a footnote, and a PNG with no channel for it is a dead end once a host re-encodes it.
How it actually works
For each image in the batch, the node quantises it to 8-bit, checks whether an Agate watermark is already present (skipped on anything under 64 px on a side), resolves which release the file belongs to, and optionally re-marks it. Then it builds a PngInfo block from the same provenance table the Python packages write and saves into ComfyUI/output/ through ComfyUI's own path helper, so filename_prefix templating, counters (Agate_00001_.png) and subfolders (agate/run_a) behave exactly like the stock node.
It has no outputs. It's a terminal output node; the only thing it returns is the list of filenames, so the saved image appears in the preview strip.
The inputs that matter
- images - the IMAGE batch. From VAE Decode after Agate Sampler, or straight off Agate Generate.
- release -
auto/003/002/001. The tooltip is the whole story:autoreads the release out of the image's watermark. There's no guessing involved, which meansautoneeds an image that actually carries the mark. - ensure_watermark (on) - adds the invisible mark to images that don't have it. Handy if you re-rendered or cropped something.
- include_workflow (on) - also writes ComfyUI's prompt/workflow chunks. Those contain your prompt, in plain text.
- filename_prefix - defaults to
Agate.
Install
Manager → search Agate, or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/logolabs/agate-comfyui
pip install -r agate-comfyui/requirements.txt
Restart. The dependency list is unusually polite for this ecosystem - diffusers>=0.30, transformers>=4.48, safetensors, huggingface_hub, and nothing that pins or replaces torch, so it won't blow up an existing environment the way heavier packs love to. The 512-px checkpoint (agate-preview-003.safetensors, 529 MB) lands in ComfyUI/models/agate/ automatically on first use. The Sampler → VAE Decode path needs an SD 1.5 VAE file; vae-ft-mse-840000-ema-pruned.safetensors in ComfyUI/models/vae/, the same 840k file every SD 1.5 setup already has.
Where people get burned
release: auto on an unmarked image throws. The error is explicit - no Agate watermark found, so its release is unknown, pick the release instead. That's the whole Sampler → VAE Decode path, because a LATENT can't carry a mark and nothing downstream adds one until you wire in Agate Watermark. Either put Watermark before this node, or set release by hand.
Flat logos on white fail to read back. The pack's own README puts it at 1–2% of images: the mark is there, the text fields are there, but detection misses it - so auto bails even on a fresh Agate Generate output. Pick the release manually and move on.
Between 64 and 256 px you get a half-mark. Detection runs at 64 px, but the dwtDctSvd embedder needs a 256×256 image and silently returns small ones untouched. So ensure_watermark can do nothing while the text fields still claim the file is marked. Crop to 200 px and you find out.
Re-encoding deletes everything, mark included. JPEG, WebP, screenshots, an editor round-trip, an upload through a host that recompresses - the chunks go, and a re-encode is also the kind of edit that can push the watermark below its read threshold. Keep the PNG. That's your master.
include_workflow leaks your prompt. It's the classic ComfyUI disclosure - the graph and the resolved prompt ride along in the file. Turn the toggle off, or launch with --disable-metadata, which makes the toggle quietly irrelevant either way.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | Agate | — |
| release | COMBO | auto | auto: the release read from the image's watermark |
| ensure_watermark | BOOLEAN | true | Add the watermark to images in which it is not found |
| include_workflow | BOOLEAN | true | Also write ComfyUI's prompt/workflow chunks (they contain the prompt) |
Outputs (0)
No outputs