Nodes/AAA Metadata System/Metadata Consolidator V2
ComfyUI Node

Metadata Consolidator V2

Make your PNGs self-describing, workflow included

By EricRollei·Created 10 months ago·Updated 8 months ago· 13
Metadata Consolidator V2
  • image
  • image
  • summary
input_filepath
extract_workflowtrue
overwrite_existingfalse
write_to_xmptrue
embed_metadatatrue
write_text_filetrue
write_to_databasefalse
debug_loggingtrue

ComfyUI already buries the workflow in the PNG - that's why you can drag an image onto the canvas and recover the whole graph. But that embedded blob is only useful inside ComfyUI. If you want the prompt, model, seed and settings to survive in a form Photoshop, Lightroom or a script can actually read, you need real metadata. That's the job here.

Metadata Consolidator V2 pulls the generation info out of a PNG, merges it with whatever metadata already exists, and writes the combined result to the industry-standard places: an XMP sidecar, embedded EXIF/XMP in the file itself, and a human-readable text file. It's from Eric Hiss's AAA Metadata System pack, which is basically his "make AI images behave like pro photography files" toolkit. If you ship images to clients, catalog a big archive, or just hate losing the seed when someone re-saves a PNG, this is the node you wire in before Save Image.

How it works

You hand it the image tensor (it passes it straight through) and the path to the PNG on disk via input_filepath. It then runs the pack's MetadataService in three steps:

  1. Read existing metadata - embedded in the file first, with a fallback to the XMP sidecar if there's nothing inside.
  2. Extract the workflow from the PNG's tEXt chunk (that's where ComfyUI keeps it) and convert it into the pack's structured ai_info.generation schema - model, prompt, negative prompt, sampler, steps, cfg, seed, size, LoRAs.
  3. Merge and write. If overwrite_existing is off (the default), existing values win and workflow data fills only the gaps. Flip it on and the workflow stomps everything. Output goes to whichever targets you've enabled.

The two outputs are the same image you put in and a summary string describing what got consolidated - handy for a debug print or a Show Text node.

The inputs that matter

  • input_filepath - required for it to do anything; leave blank and it politely returns "No filepath provided."
  • overwrite_existing - the merge rule. Leave off unless you want the embedded workflow to be the source of truth.
  • The write toggles: write_to_xmp, embed_metadata, and write_text_file are all on by default. write_to_database is off - that's for the pack's optional SQLite catalog, skip it unless you're building one.

One thing worth knowing: the deep embedded-metadata features lean on optional dependencies (PyExiv2, and ExifTool for extra formats) that the README tells you to install separately because they're platform-specific. The node works without them, but you'll get the most complete XMP output with PyExiv2 present.

Installing it

You're installing the whole AAA Metadata System pack, not just this node:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System.git
cd AAA_Metadata_System
pip install -r requirements.txt

Then restart ComfyUI. ComfyUI Manager users: search for "AAA Metadata System" and install from there. No model files are needed. Heads-up on the license: it's CC BY-NC for non-commercial use; commercial use needs a paid license from the author (Eric Hiss, [email protected]). Check the README before you use it in client work.

Troubleshooting

  • "No filepath provided" / "File does not exist" - it needs a real absolute path to a PNG on disk; a tensor alone isn't enough.
  • Nothing lands in the file - confirm the write toggles are on, and check the console with debug_logging on; the node prints its consolidation steps there.
  • Existing metadata keeps winning - that's the merge policy doing its job. Turn on overwrite_existing if you actually want the workflow data to override.

It's a fiddly niche, and most people don't need their PNGs to be Adobe-ready. But if you're one of the ones who does, this is the smoothest path from "ComfyUI workflow blob" to "file a catalog software can read."

CategoryEric's Nodes/Metadata

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
input_filepathSTRING
extract_workflowBOOLEANtrue
overwrite_existingBOOLEANfalse
write_to_xmpoptBOOLEANtrue
embed_metadataoptBOOLEANtrue
write_text_fileoptBOOLEANtrue
write_to_databaseoptBOOLEANfalse
debug_loggingoptBOOLEANtrue

Outputs (2)

NameTypeDescription
imageIMAGE
summarySTRING