Nodes/😸 YFG Comical Nodes/🐯 YFG CivitAI MetaSave V2
ComfyUI Node

🐯 YFG CivitAI MetaSave V2

Saves images with full A1111-compatible CivitAI metadata (model, LoRA, embedding hashes, sampler settings, prompts) so CivitAI automatically populates resources and generation info. V2 adds metadata-aware filename tokens, configurable file numbering, unlimited extra metadata fields that grow as you use them, and filename / filepath outputs.

By gonzaluΒ·Created 2 years agoΒ·Updated 6 days agoΒ· 29
🐯 YFG CivitAI MetaSave V2
  • images
  • filename
  • filepath
β—„filename_prefixComfyUIβ–Ί
β—„subdirectory_nameβ–Ί
β—„output_formatpngβ–Ί
β—„save_workflow_jsonfalseβ–Ί
β—„quality100β–Ί
β—„metadata_scopefullβ–Ί
β—„filename_numberingalwaysβ–Ί
β—„numbering_start1β–Ί
β—„numbering_padding5β–Ί
β—„include_batch_numfalseβ–Ί
β—„prefer_nearesttrueβ–Ί
β—„extra_key1β–Ί
β—„extra_value1β–Ί
Category🐯 YFG/πŸ’Ύ Save

Inputs (14)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
filename_prefixSTRINGComfyUIPrefix for the saved filename. Built-in tokens: %date:yyyy-MM-dd% %seed% %model% %width% %height% %pprompt:32% %nprompt:32% (:N truncates to N chars) Custom metadata tokens: %extra:KEY% value of the extra metadata field named KEY %extra:KEY:12% same, truncated to 12 characters %KEY% extra field KEY, or any captured metadata field such as %Sampler%, %Steps%, %CFG scale% Key matching is case-insensitive. Unresolved tokens are replaced with nothing and logged to the console. A literal / creates a subfolder; slashes inside substituted values are made safe.
subdirectory_nameSTRINGOptional sub-folder inside the output directory. Supports the same tokens as filename_prefix. Leave blank for the default output folder.
output_formatCOMBOpngImage format to save. png – lossless, metadata stored in a PNG text chunk jpg – lossy, metadata stored in EXIF UserComment webp – metadata in EXIF; lossless when quality is 100
save_workflow_jsonBOOLEANfalseAlso write a sidecar .json file containing the raw ComfyUI workflow alongside the image.
qualityINT1001–100Compression quality for jpg and webp. 100 is best quality (and lossless for webp). Ignored for png.
metadata_scopeCOMBOfullfull – 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
filename_numberingCOMBOalwaysalways – every file is numbered, including the first on_conflict – first file is unnumbered; a number is only added when the name already exists
numbering_startINT10–999999First number to use. 0 starts at 0000, 1 starts at 0001.
numbering_paddingINT51–10Digits to pad the number to. 5 gives 00001, 4 gives 0001.
include_batch_numBOOLEANfalseAppend a 5-digit batch index to the filename when saving multiple images from one run.
prefer_nearestBOOLEANtrueWhen multiple upstream nodes provide the same metadata field, prefer the one closest (fewest graph hops) to this node.
extra_key1optSTRINGMetadata key, e.g. 'Prompt Index'. Also usable in filename_prefix as %extra:Prompt Index%. Fill this in and another pair appears below.
extra_value1optSTRINGMetadata value. Type it, or wire it from another node β€” numbers and strings are both accepted.

Outputs (2)

NameTypeDescription
filenameSTRINGFilename of the last image saved this run, including extension.
filepathSTRINGFull absolute path of the last image saved this run.