Save Image w/Metadata
Make Civitai actually read your ComfyUI settings
- images
Here's the problem this node exists to fix. ComfyUI already stuffs your whole workflow into the PNG as JSON - drag the image back in and the graph rebuilds. Great feature. But Civitai and Prompthero don't read that JSON. They auto-detect the old A1111-style parameters string (prompt, negative prompt, Steps: 20, Sampler: euler, CFG scale: 7, Seed: ...), and a stock ComfyUI image simply doesn't carry one. So you upload a Comfy render and the site shows nothing - no prompt, no seed, no settings - and you're back to keeping a notepad. That's the exact headache the pack's author hit in 2023, and this node is his answer. It writes the parameters string those sites expect, into png, jpeg, or webp.
How it works
It's a drop-in replacement for the normal Save Image node, with extra fields. You hand it the image plus the generation settings, and it stamps them into the file's metadata in the format Civitai and Prompthero parse. The important bit: it doesn't sniff those settings out of your sampler. You wire them in. Whatever you type or connect is what gets written - the node trusts you.
That sounds like a footgun, and it is one, but it's also the point. Because you feed the values in by hand, you can feed it the resolved ones. Use wildcards or dynamic prompts? Wire the final rendered prompt (the one that actually reached the sampler) into positive, and the metadata records the real text instead of the __wildcard__ template. Native ComfyUI metadata can't do that. This node can.
The inputs that matter
- images - the
IMAGEto save. Required. - positive / negative - your prompt text (multiline). These default to
"unknown", which is your tell that you forgot to connect them. - filename - defaults to
%time_%seed; the%timeand%seedtokens get expanded, so files self-name with a timestamp and the seed.pathsets the subfolder. - extension -
png,jpeg, orwebp. PNG is lossless and the safe default;jpeg/webpare smaller, withquality_jpeg_or_webpandlossless_webpto tune them. - The mirror fields - steps, cfg, sampler_name, scheduler, modelname, seed_value, width, height. These are the metadata. They only match your render if you drive them from the same source your sampler uses.
There are no outputs - like any save node, it's a terminal node that just writes the file.
That last point is the whole reason this pack ships a pile of little Seed Generator / Cfg Literal / Sampler Selector helpers. Define each value once, split the wire so it feeds both your KSampler and this node, and the saved metadata is guaranteed to match what actually ran. Type cfg 8 here while your sampler quietly ran 4 and you've just published a lie.
Installing it
Easiest path: ComfyUI Manager, search Save Image with Generation Metadata, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/giriss/comfy-image-saver
cd comfy-image-saver
pip install -r requirements.txt
Then restart ComfyUI. Small requirements file for the metadata/EXIF writing, no model downloads.
Where people get tripped up
If Civitai shows nothing after upload, check positive/negative first - a stray "unknown" means you never connected them. Second, know the format's ceiling: the A1111 parameters string has one slot per field. A genuinely complex graph - multiple checkpoints, a hi-res pass, a refiner - can't be flattened into those few fields honestly, so feed it the settings from the pass that matters (usually the base generation) and accept that the metadata is a summary, not the full workflow. For that, the embedded JSON ComfyUI already writes is still your real reproduction record.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename | STRING | %time_%seed | — |
| path | STRING | — | |
| extension | COMBO | 3 options: png, jpeg, webp | |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
| modelname | COMBO | 0 options: | |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| positiveopt | STRING | unknown | — |
| negativeopt | STRING | unknown | — |
| seed_valueopt | INT | 00–18446744073709550000 | — |
| widthopt | INT | 5121–16384 | — |
| heightopt | INT | 5121–16384 | — |
| lossless_webpopt | BOOLEAN | true | — |
| quality_jpeg_or_webpopt | INT | 1001–100 | — |
| counteropt | INT | 00–18446744073709550000 | — |
| time_formatopt | STRING | %Y-%m-%d-%H%M%S | — |
Outputs (0)
No outputs