π― YFG CivitAI MetaSave
The save node that speaks A1111 so CivitAI can read it
- images
If you upload to CivitAI, you've probably had the moment: the image looks right, and the site's "Resources Used" section sits empty - no model, no LoRAs, no settings. That's because CivitAI reads generation info from a specific A1111-style parameters text chunk embedded in the file, plus the SHA-256 hashes of the models you used, and stock ComfyUI's SaveImage doesn't write any of that. YFG CivitAI MetaSave is a save node that does.
It's a one-node replacement for the two-node SaveImageWithMetaData + CreateExtraMetaData combo from edelvarden's comfyui_image_metadata_extension, which was itself a fork of nkchocoai's ComfyUI-SaveImageWithMetaData. The YFG author merged the pair back into a single node and baked four custom key/value slots straight into it - no helper nodes, no second save node floating around your graph.
How it works
When the queue reaches it, the node walks your graph backward from the save to find the checkpoint, LoRAs (from LoraLoader nodes and inline <lora:name:weight> syntax in the prompt), embeddings, sampler settings, seed, and prompts. Model files get SHA-256 hashed - the first 10 hex characters, which is the fragment CivitAI matches against its model database - and the hashes are cached on disk in civitai_metasave/.cache/model_hash_cache.json. First run pays the hashing cost; every run after that is free.
It then assembles the A1111 parameters block (positive prompt, Negative prompt:, then key: value settings) that CivitAI parses, and optionally embeds the full ComfyUI workflow JSON. PNG carries it in tEXt chunks; for JPEG and WebP the same info goes into an EXIF UserComment via piexif, so CivitAI can read it in any format.
The inputs that matter
- images (
IMAGE) - what you're saving, straight from your VAE decode or upscale. - filename_prefix - supports tokens:
%date:yyyy-MM-dd%,%seed%,%model%,%pprompt:32%,%nprompt:32%,%width%,%height%. Great for seed/model in the filename. - output_format -
png,jpg, orwebp, each optionally_with_jsonto also write a sidecar workflow file. Default ispng_with_json. - quality -
max(100, lossless WebP) down tolow(30). Ignored for PNG. - metadata_scope -
full(parameters + workflow),default(same as stock SaveImage),parameters_only,workflow_only, ornone. - extra_key1β4 / extra_value1β4 - your own custom metadata tags, no extra nodes.
include_batch_num appends a 5-digit batch index to filenames when you save multiple images; prefer_nearest picks the upstream value closest to the save node when several nodes supply the same field.
Where people get burned
The README is upfront about the big one, and it's a real trap: Steps are required. If the node can't find a Steps value upstream, it skips the parameters string entirely and prints a warning to the console. That's a CivitAI parser requirement, not a bug - if your custom sampler doesn't expose steps, the metadata won't be recognized. Make sure steps are visible in the trace.
Second honest caveat: detection lives or dies on the hash. Rename or re-merge a model and CivitAI won't recognize it even though your metadata is perfect. This is the exact complaint you'll see in the "CivitAI isn't detecting my LoRAs" threads - the site matching hashes to its database is the last mile, and no save node can force it. What this node does is produce the correct format, which is the part you actually control.
Should you install it?
If you post to CivitAI regularly and want "Resources Used" to fill itself out, yes - this is the one to reach for, and it replaces a two-node dance with a single node. If you never upload there, stock SaveImage is fine; don't install the pack just for this. Installing is the standard YFG Comical flow:
cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical
or search YFG Comical in ComfyUI Manager. piexif is declared in the pack's pyproject.toml and installs automatically. No models to download.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | ComfyUI | Prefix for the saved filename. Supports tokens: %date:yyyy-MM-dd%, %seed%, %pprompt:32%, %nprompt:32%, %model%, %width%, %height%. |
| subdirectory_name | STRING | Optional sub-folder inside the output directory. Supports %date:yyyy-MM-dd% tokens. Leave blank for the default output folder. | |
| output_format | COMBO | png_with_json | Image format to save. The *_with_json variants also write a sidecar .json file containing the raw workflow. |
| quality | COMBO | max | Output quality: max=100 (lossless WebP), high=80, medium=60, low=30. Ignored for PNG. |
| metadata_scope | COMBO | full | full β A1111 parameters + full ComfyUI workflow default β same as the built-in SaveImage node parameters_only β A1111-style parameters string only workflow_only β ComfyUI workflow JSON only none β no metadata embedded |
| include_batch_num | BOOLEAN | false | Append a 5-digit batch index to the filename when saving multiple images. |
| prefer_nearest | BOOLEAN | true | When multiple upstream nodes provide the same field, prefer the one closest (fewest hops) to this node. |
| extra_key1opt | STRING | Custom metadata key 1 | |
| extra_value1opt | STRING | Custom metadata value 1 | |
| extra_key2opt | STRING | Custom metadata key 2 | |
| extra_value2opt | STRING | Custom metadata value 2 | |
| extra_key3opt | STRING | Custom metadata key 3 | |
| extra_value3opt | STRING | Custom metadata value 3 | |
| extra_key4opt | STRING | Custom metadata key 4 | |
| extra_value4opt | STRING | Custom metadata value 4 |
Outputs (0)
No outputs