ScarlotSoft Metadata Reader
Read the workflow out of a PNG — the ScarlotSoft Metadata Reader node
- METADATA
- IMAGE
In this ecosystem the image is the project file. A PNG that came out of ComfyUI carries the whole graph - the prompt, seed, settings - embedded as text chunks, and a PNG from A1111 carries its flat settings string. ScarlotSoft Metadata Reader is the node that pulls that text back out: pick an image from your input folder and it returns a human-readable METADATA string plus the image itself as a tensor, so you can read the recipe that made it and feed the pixels onward at the same time.
The two dialects matter, because the node speaks both. ComfyUI writes a prompt chunk - JSON in API format - and the node walks that JSON, hunting node types and inputs: checkpoint from any loader, seed/steps/cfg/sampler/scheduler from any KSampler, LoRA names (with lyco detection), hypernetworks, and the prompt text from every CLIP encoder (joined with pipes when there are several). Out comes a tidy block: Checkpoint:, LoRAS:, LyCOS:, Hypers:, Seed:, Steps:, CFG:, Sampler:, Scheduler:, Prompt:. If the PNG instead carries an A1111-style parameters chunk, it returns that raw settings string verbatim. Neither present? You get Metadata: NONE - honest, and it still hands you the image.
That's exactly the behavior the KB's image-io-metadata doc describes as the convention: ComfyUI graphs and A1111 strings are different dialects, and a reader that handles both is the useful kind. It's also the node for the other direction of the "drag it back in" habit - when you can't drag (an image you're told was made elsewhere, or a file with metadata you want to log), this extracts it as text you can pipe into a preview or a log node.
The practical setup: the image input is a dropdown of files in ComfyUI/input/ (with the upload flag, so you can drag a PNG in and immediately read it). Outputs are METADATA (STRING) and IMAGE (tensor). If the file path somehow doesn't resolve, it returns Metadata: NONE plus a small empty tensor rather than erroring - defensive, if a bit quiet about why.
The honest caveats: it parses the API-format prompt, so you get the flattened node-by-node graph, not the annotated layout a full UI workflow gives you - that's inherent to the format, not a bug in the node. And it reads the chunk if it's there; if a host re-encoded the image (Reddit, Discord inline previews, most re-compressors), the chunk is gone and no reader can conjure it back. Keep the original PNG as your master.
Install with the pack - ComfyUI Manager → search ScarlotSoft → install → restart:
cd ComfyUI/custom_nodes
git clone https://github.com/scarlotsoft/ComfyUI_ScarlotSoft
No dependencies. Suite theme; hard-refresh after a UI-mode switch.
This is the pack's own README's headline "Metadata Reader" and it delivers. If you hoard others' PNGs to learn their settings, or you want a logged text record of your own generations, this is the cleanest in-graph way to get it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| METADATA | STRING | — |
| IMAGE | IMAGE | — |