ComfyUI Node

Create Extra MetaData

Stamp your own key-value pairs onto every saved image

By xxmjskxx·Created about a year ago·Updated about a month ago· 25
Create Extra MetaData
  • extra_metadata
  • EXTRA_METADATA
key1
value1
key2
value2
key3
value3
key4
value4

The save node in this pack is smart about pulling prompts, samplers, LoRAs, and hashes out of your graph automatically. But it can't know what you know - that this image is "render_04_for_competition", that it's licensed a certain way, or that it was made with a specific workflow variant. That's the gap Create Extra MetaData fills: it's a tiny node that lets you bolt arbitrary key-value pairs onto the metadata before the image is saved.

Think of it as the caption field on your exports. It's a pure utility - no fancy mechanism, no models. You type a key and a value, wire the EXTRA_METADATA output into the extra_metadata input on Save Image w/ Metadata Universal, and those pairs ride along in the PNG's text chunks alongside everything else. The author built it as the manual complement to the automatic capture: the auto side gets the reproducible stuff, this gets the stuff only you can supply.

The inputs

The schema is refreshingly boring:

  • key1 / value1 (required) - your first pair.
  • key2/value2, key3/value3, key4/value4 (optional) - up to four pairs typed in manually.
  • extra_metadata (optional) - an EXTRA_METADATA input. This is the clever bit: it lets you chain nodes, so one Create Extra MetaData can feed another, or you can wire in a computed value (say from Show Any (Any to String)) and merge it into the set. Recent versions made the pair count dynamic instead of the old hardcoded four.

Keys and values are plain strings. Empty keys, or values that are None or "", are simply ignored - so you can leave spare pairs blank without worrying about junk metadata.

The output is a single EXTRA_METADATA socket. It's a bundle type, not a string, so it only plugs into inputs that expect metadata - chiefly the save node's extra_metadata input. Don't try to wire it into a text node; that's what the Show Any / Show Text nodes are for.

How to use it

Drop it in front of your save node:

  1. Create Extra MetaDataSave Image w/ Metadata Universal (via the extra_metadata input).
  2. Fill in key1/value1 with something like project / spring_collection, or workflow_variant / v3.
  3. Save, then open the PNG in any metadata viewer (or drag it back into ComfyUI). Your pairs show up as plain text keys.

A couple of practical notes. First, values land as strings, so if you want a number, type it as text - metadata doesn't care, but downstream tools might. Second, one older community answer claimed commas in values get replaced with slashes; that behavior was removed in v1.4.3, so commas now survive intact. Still, keeping values short and slash-friendly is a decent habit if you're targeting Civitai's parser. And if you're using this to add searchable tags for Windows Explorer, note that only JPEG saves write a comment field Explorer can see - PNGs don't expose one, which is a Windows limitation rather than a node bug.

For everything the automatic capture gets right, there's always going to be one field it can't guess. This node is that field.

CategorySaveImageWithMetaDataUniversal

Inputs (9)

NameTypeDefaultDescription
key1STRING
value1STRING
key2optSTRING
value2optSTRING
key3optSTRING
value3optSTRING
key4optSTRING
value4optSTRING
extra_metadataoptEXTRA_METADATA

Outputs (1)

NameTypeDescription
EXTRA_METADATAEXTRA_METADATA