ITL Save Metadata (Civitai)
Save with A1111-style metadata
- images
- images
Here's the problem nobody tells you about until you post to Civitai: ComfyUI's stock Save Image embeds the workflow as a node graph (workflow/prompt chunks), and Civitai's auto-detection keys on a completely different format - the flat, A1111-style parameters text chunk that reads like Steps: 30, Sampler: DPM++ 2M, CFG scale: 5, Seed: .... Feed it a ComfyUI graph and it can't reliably pull out your prompt, let alone auto-link the checkpoint and LoRAs. People literally wrote articles titled "Stop using ComfyUI's default Save Image node (if you post to Civitai)."
This node is the fix: a drop-in Save Image replacement that writes the A1111 parameters chunk - and traces your actual graph at save time so the metadata is true, not best-guessed.
How it works
At save time the node walks backward from the KSampler that feeds the saved image and traces the real settings used on this specific run: positive, negative, steps, CFG, seed, sampler, scheduler, model, and LoRAs. If that walk doesn't land on one sampler, it falls back to "the only sampler in the graph." The result is written as one parameters chunk in A1111 order, with each traced LoRA appended to the positive line as <lora:name:weight> and listed again in Lora hashes: - the two signals Civitai uses to auto-link the resource. Unknown fields are omitted, never guessed; if something can't be traced, a warning names the unresolved field so you know to switch to the Advanced node.
The clever part for batch users: when the positive/negative text comes from an ITL Prompt Batch node, the trace reads that node's current run index and resolves the exact line that ran for this queue item - not the whole batch list. One graph, N prompts, and each save still records its own truth.
Hashing and the cache
Civitai matches a checkpoint or LoRA to its page by AutoV2 - the first 10 hex characters of the file's full SHA-256. Hashing a multi-GB checkpoint is slow, so hashes are cached in .hash_cache.json (in the pack folder) keyed by path + size + mtime. The first save of a new checkpoint or LoRA pays the hashing cost once; every save after that is instant. Note the README is upfront that end-to-end confirmation - uploading a real image and watching Civitai auto-link - was still a pending manual check at time of writing, so treat the hash side as "should work" rather than "confirmed by the author."
Inputs, outputs, install
- images - what to save.
- filename_prefix - default
ITL; supports%date:...%tokens like stock Save Image. - save_workflow - off by default: the PNG carries only the Civitai
parameterschunk. Turn it on to also embed the ComfyUI workflow/prompt chunks (like stock Save Image) if you want the graph recoverable from the file.
It's an output node (is_output_node), so it always runs, and it passes images through as an output for chaining. There's also a 🔎 Test detection button that runs the same trace against the live editor graph and previews what will be saved before you queue.
Install via ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils
then restart. No extra dependencies.
The one real limitation: the trace assumes a single KSampler. A hires-fix workflow with two samplers isn't disambiguated - that's exactly the case where you wire the Advanced node's override sockets instead.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Images to save. | |
| filename_prefix | STRING | ITL | Filename prefix (supports %date:...% tokens like Save Image). |
| save_workflow | BOOLEAN | false | Also embed the ComfyUI workflow/prompt chunks (off = only the Civitai `parameters` chunk). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |