Nodes/AAA Metadata System/Split Workflow Extractor V2
ComfyUI Node

Split Workflow Extractor V2

Rescue the workflow buried in that stubborn PNG

By EricRollei·Created 10 months ago·Updated 8 months ago· 13
Split Workflow Extractor V2
  • image
  • image
  • workflow_summary
  • workflow_json
input_filepath
write_to_xmptrue
embed_metadatatrue
write_text_filefalse
write_to_databasefalse
overwrite_existingfalse
debug_loggingfalse

Here's a frustration every ComfyUI regular has hit: you download an image or dig out an old render, drag it onto the canvas expecting the whole workflow to reconstruct, and ComfyUI shrugs. The reason is usually that the workflow wasn't stored in the nice single workflow field - some tools split it across multiple metadata fields, and the standard drag-drop path can't reassemble it. Split Workflow Extractor V2 exists to find those fragments and stitch them back together.

It's from the AAA Metadata System pack, and it slots right into the "recover what this image was made with" family alongside PNG Metadata Extractor V3. Where V3 is the general-purpose reader, this node is the specialist for the split-workflow mess, with the bonus that it can re-write the recovered data out to XMP sidecars, embedded metadata, text files, or the pack's database as it goes.

How it works

You feed it an image and a filepath. It reads the PNG's metadata, detects when the workflow data is split (a reference in one field pointing at the rest in another), extracts and merges the fragments into a complete workflow JSON, then hands it back. The overwrite_existing toggle controls whether the recovered workflow clobbers what's already embedded - leave it off until you're sure the merge looks right. The write toggles (write_to_xmp, embed_metadata, write_text_file, write_to_database) decide how much of the result gets persisted back into the file or the pack's store.

One honest caveat from the code: it only processes PNG files. If you point it at a JPEG, it'll politely tell you workflows only live in PNGs. That's a format fact, not a bug - the workflow field is a PNG convention.

Inputs and outputs that matter

  • image (required, IMAGE) - the image whose metadata you're reading; you typically get this from a load-image node.
  • input_filepath (required, STRING) - the absolute path to the same PNG. Yes, it's redundant with the image, but the node needs the real path to read raw metadata.
  • write_to_xmp / embed_metadata (default true) - keep these on if you want the merged workflow persisted.
  • overwrite_existing (default false) - off by default, and you should leave it that way until you've eyeballed a result.

Outputs: image (pass-through), workflow_summary (a string describing what was recovered), and workflow_json (the merged workflow as JSON - wire this into anything that consumes a workflow, or just look at it to confirm the graph survived).

Installing it

Part of AAA Metadata System by Eric Hiss (GitHub: EricRollei). Install via ComfyUI Manager (search "AAA Metadata System") or:

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

Restart ComfyUI and it's ready. Core dependencies cover it; nothing exotic needed.

Common issues

If you get "No filepath provided", you forgot the path - the node refuses to guess from the image alone, which is deliberate. If the summary shows a split reference but the JSON comes back thin, check overwrite_existing isn't fighting a previous extraction and confirm the file really is PNG. And temper expectations: if the original file was saved by a tool that never embedded a workflow at all, there's nothing to stitch and you'll get an empty result. This node recovers what's there; it can't manufacture what never got saved.

CategoryEric's Nodes/Metadata

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
input_filepathSTRING
write_to_xmpoptBOOLEANtrue
embed_metadataoptBOOLEANtrue
write_text_fileoptBOOLEANfalse
write_to_databaseoptBOOLEANfalse
overwrite_existingoptBOOLEANfalse
debug_loggingoptBOOLEANfalse

Outputs (3)

NameTypeDescription
imageIMAGE
workflow_summarySTRING
workflow_jsonJSON