Save Image (Civitai Metadata)
Make Civitai actually link your model
- images
- parameters
ComfyUI's stock Save Image node writes your graph into the PNG and stops there. It never writes the flat A1111 parameters string, which is what Civitai's uploader actually parses - so you post a generation and get no model link, no LoRA links, no generation-data block. This node writes both.
What you're getting
Metadata here is upside down: the image is the project file. ComfyUI puts workflow and prompt chunks in every PNG, so dragging the file back onto the canvas rebuilds your pipeline. A1111 instead writes a single parameters chunk - a flat Steps: … Sampler: … Seed: … string. Neither reads the other's chunk, but Civitai reads the A1111 one, matching your checkpoint and LoRAs by hash.
So people swap save nodes. This one is credited as based on SeeSee's ComfyUI-SeeSee-Civitai-Metadata and reuses its format and hashing code. Default mode writes both dialects side by side. Civitai tries A1111 first, so the parameters block wins for auto-linking and drag-and-drop still works. Same images input: delete Save Image, drop this in, reconnect.
How it works
On Queue it walks your graph backwards from its images input, breadth-first, following IMAGE and LATENT links until it hits a sampler - spotted structurally (a node with model/guider, a steps/seed and a latent input) rather than by class name, so KSampler, SamplerCustomAdvanced and third-party samplers all trace. It keeps walking through each sampler to the previous one, which is how a hires pass becomes Hires steps / Hires upscaler / Denoising strength instead of collapsing into one generation.
Your seed, steps and prompt usually arrive over a link; the saved prompt JSON only holds the link. So the node reads ComfyUI's live output cache for what actually went down the wire, falling back to reading simple value nodes statically when it can't.
The text gets A1111 labels (dpmpp_2m → DPM++ 2M), and a stray Negative prompt: inside your prompt is rewritten so the parser doesn't split there. Hashes are SHA256 of the model file, cached in ComfyUI/user/seesee-civitai-metadata/hash_cache.json by path, size and mtime; only the first ten hex chars are written - AutoV2, the form Civitai stores. Checkpoints, LoRAs and embeddings get hashed, not the VAE or the text encoder. A Civitai Helper .civitai.info or LoRA Manager .metadata.json sidecar lets the node lift the Civitai version id and write a Civitai resources block with weights, the strongest signal you can give the uploader.
Fields that matter
file_format is the only one worth thinking about. PNG_with_workflow (default) writes parameters plus prompt/workflow, so Civitai and drag-and-drop both work. PNG_only_parameters drops the graph. PNG_with_no_meta is bare and skips the trace entirely - also the fast choice for throwaway batches. The JPG_* modes put the parameters text in EXIF UserComment (the Exif Sub-IFD, tag 0x9286, where exiftool and Civitai look); Civitai reads it, but you can't drag a JPEG back into ComfyUI.
filename_prefix works like the stock node's (%date:yyyy-MM-dd%, %Node.widget%, slashes make subfolders) and adds %label% from the label field, sanitised server-side, so /, \, ../ and leading dots are stripped. quality only affects JPEG. preview off saves files without pushing them to the UI, the slow part of a big batch. One output, parameters (STRING), holding the text written into the file; empty in the *_with_no_meta modes.
Install
No dependencies, no requirements.txt, no model files; piexif is optional and Pillow builds the EXIF without it. In ComfyUI Manager, search DemonAlone-JS_Addon-ComfyUI, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-JS_Addon-ComfyUI
The rest of the pack is a grab-bag (Video Maker V2, Load Video, Node/Group Controllers, Resolution Selector, AnySwitch, Image Comparer); you need none of it. Installing a pack for one node is normal.
When it goes wrong
"no sampler found upstream" in the console. The trace broke: something between the sampler and this node doesn't preserve the IMAGE/LATENT link. The image still saves, bare. It logs a summary line each run ([Civitai Metadata] node 12: model …, seed 1234, 30 steps, DPM++ 2M/Karras, cfg 5); no line means nothing traced.
The first save of a model hangs. That's the checkpoint being hashed - 20 GB takes a while. One-time per file, keyed on path/size/mtime, slow on network shares.
Civitai still won't link it. Matching is by SHA256, so the file must be byte-identical. Merges, re-uploads and your own fine-tunes won't match, and no save node fixes that.
Upload parsed as empty. Civitai's validation is all-or-nothing: one wrong-typed field drops the whole metadata block.
Privacy gotcha: the parameters chunk is written even with --disable-metadata, which only suppresses prompt/workflow. Want zero generation data? Pick a *_with_no_meta format.
Verdict
Post to Civitai? Install it - auto-linked model and LoRA credits for the price of one node swap. Generate only for yourself? The stock node is fine. Tracing is more careful than most nodes that try this.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. Same formatting options as the normal Save Image node (%date:yyyy-MM-dd%, %Node.widget%), plus %label% which expands to the label input below. |
| file_format | COMBO | PNG_with_workflow | PNG_with_workflow: A1111 'parameters' plus ComfyUI's prompt/workflow chunks, so the PNG can be dragged back into ComfyUI. PNG_only_parameters: A1111 'parameters' only. PNG_with_no_meta: a bare PNG, no chunks at all (the graph is not traced). JPG_only_parameters: JPEG with the parameters text in EXIF UserComment (Civitai reads it; ComfyUI cannot drag-and-drop from it). JPG_with_no_meta: a bare JPEG. |
| label | STRING | Value substituted for %label% in filename_prefix. Sanitised: path separators, traversal ('../', 'a/b', 'C:\') and leading dots are stripped before it is used. | |
| quality | INT | 901–100 | JPEG quality. Ignored for PNG. |
| preview | BOOLEAN | true | Show the saved images in the node's preview. Turning this off saves the files without sending them back to the UI. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| parameters | STRING | The A1111 parameters text written into the file (empty in *_with_no_meta modes). |