Nodes/Cyberdelia Image Metadata/Save Image With Metadata (Cyberdelia)
ComfyUI Node

Save Image With Metadata (Cyberdelia)

Stop retyping your seed on Civitai — let Save Image With Metadata (Cyberdelia) do it

By cyberdeliaAI·Created 4 months ago·Updated 10 days ago· 7
Save Image With Metadata (Cyberdelia)
  • images
  • extra_metadata
  • context
  • IMAGE
filename_prefixComfyUI
subdirectory_name
output_format
quality
metadata_scope
include_batch_numtrue
prefer_nearesttrue

ComfyUI's stock SaveImage embeds the full node graph in your PNG, which is perfect for dragging the file back onto the canvas. It just doesn't write what Civitai wants. Civitai's uploader auto-detects a flat A1111-style parameters block with model hashes, and the default node doesn't emit one - so unless you swap in a metadata-savvy save node, you're the one typing "Steps: 28, CFG: 5, seed 1234…" into every single upload. Save Image With Metadata (Cyberdelia) is a drop-in replacement that writes both worlds: the ComfyUI workflow and prompt chunks, plus the A1111 parameters string with resource hashes, so Civitai fills in your model, LoRAs, seed, and sampler settings automatically. No copy-paste, no manual entry.

It's the latest in a long fork chain: nkchocoai's SaveImageWithMetaData started it, edelvarden's extension and Santodan's revived pack kept it alive, and Cyberdelia AI Lab rebuilt the attribution logic for v2. The hard part of this family was never writing the text - it's figuring out what the text should be. The node traces your graph backward from the save point to find the sampler, checkpoint, LoRAs, seed, and prompt texts. Walk that graph naively and you grab the wrong things: a negative routed through a ControlNet apply chain, a ConditioningZeroOut that's meant to blank the negative but gets read as real, or the first sampler found instead of the primary one in a multi-pass upscale workflow. The v2 pitch is that these walks follow the right slot through rgthree Context nodes, skip zeroed-out conditioning, report the farthest sampler in base-plus-upscale setups, and capture runtime-resolved text from wildcard expanders and LLM prompt engineers like Z-Engineer.

The inputs that matter

The only connection you have to make is images - wire your VAE decode here. Everything else is a widget with a sane default:

  • filename_prefix - a template, not just a prefix. %seed%, %model%, %pprompt%, and %date:yyyy-MM-dd% all interpolate, so %date:hhmmss%_%seed% gives you a sortable filename.
  • subdirectory_name - a relative folder inside ComfyUI/output/, also templated. Leave it empty for the default output directory.
  • output_format - png, jpg, or webp, each with a _with_json variant that also writes a sidecar workflow .json.
  • metadata_scope - full (default: everything plus your custom extra metadata), default (same as stock SaveImage), parameters_only (just the A1111 string), workflow_only, or none for a clean file.
  • context - an optional rgthree Context/Context Big socket. If you use rgthree, feeding the CONTEXT wire in makes non-empty values authoritative and stops the graph walker guessing. It's safe to leave disconnected.

There's one output, IMAGE, so the node can sit mid-graph instead of always ending the line. quality (max/high/medium/low) only affects JPG and WebP; PNG ignores it.

Install

Easiest through ComfyUI Manager - search comfyui-cyberdelia-metadata or Cyberdelia. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/cyberdeliaAI/comfyui-cyberdelia-metadata.git

Restart ComfyUI. There's no model download and no heavy dependency: requirements.txt is a single line (piexif, for EXIF on the JPG/WebP paths) and PIL/numpy come with ComfyUI.

Where people get burned

  • full scope errors. If saving throws, it's usually an unrecognized third-party node in your graph that the walker can't attribute. Swap it for a Comfy core equivalent, or drop a small definition file in modules/defs/ext/ following the existing pattern - the pack ships adapters for ~20 packs (rgthree, efficiency-nodes, RES4LYF, GGUF, WanVideoWrapper, and more).
  • Node id migration. v2 deliberately uses unique ids (CyberdeliaSaveImageWithMetaData, not the old shared SaveImageWithMetaData), so it coexists with nkchocoai's original without a load-order fight. Old workflows remap automatically; save once to persist. For a folder of workflow JSONs, python3 scripts/migrate_workflows.py /path/to/workflows dry-runs first, then --write.
  • Metadata is the payload, not a footnote. JPG and WebP carry the parameters string in EXIF but drop the ComfyUI graph chunks - drag-back round-tripping is PNG-only. Keep the PNG as your master and treat the small formats as derivatives, because any re-encode, Reddit upload, or screenshot silently deletes the workflow that lives in the file.
CategoryCyberdelia/Metadata

Inputs (10)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
filename_prefixSTRINGComfyUIThe prefix for the saved file. You can include formatting options like %date:yyyy-MM-dd% or %seed%, and combine them as needed, e.g., %date:hhmmss%_%seed%.
subdirectory_nameSTRINGRelative directory inside the ComfyUI output folder. Leave empty to use the default output directory. You can include formatting options like %date:yyyy-MM-dd%.
output_formatCOMBOThe format in which the images will be saved.
extra_metadataoptEXTRA_METADATAAdditional key-value metadata to include in the image.
contextoptRGTHREE_CONTEXTOptional rgthree Context/Context Big input. Non-empty context values take priority over automatic graph detection.
qualityoptCOMBOImage quality: 'max' / 'lossless WebP' - 100 'high' - 80 'medium' - 60 'low' - 30 Note: Lower quality, smaller file size. PNG images ignore this setting.
metadata_scopeoptCOMBOChoose the metadata to save: 'full' - default metadata with additional metadata, 'default' - same as SaveImage node, 'parameters_only' - only A1111-style metadata, 'workflow_only' - workflow metadata only, 'none' - no metadata.
include_batch_numoptBOOLEANtrueInclude batch number in filename.
prefer_nearestoptBOOLEANtrueSelect inputs from closest nodes first if true.

Outputs (1)

NameTypeDescription
IMAGEIMAGE