Practical guide
Extract the workflow and API prompt stored in a ComfyUI PNG
The image and its saved workflow are different data. Read the official SDXL PNG's two text fields, preserve each JSON document exactly, and understand what those documents contain before handing them to another tool.
18 October 2026 · Check AI Free
Download the official original rather than a rendered preview
Use the fixed-revision official ComfyUI SDXL example linked below. Download its raw/original PNG from the upstream repository. The checked file is 1024 × 1024 pixels and 1257779 bytes. It contains two tEXt fields: prompt first, workflow second. Both strings matched independent Pillow extraction exactly.
This tutorial inspects saved JSON; it does not run the graph. A source example from the upstream project is different from the self-authored tiny fixtures used for failure and precision controls. Keep those sources separate, and do not assume that a website preview preserves the original's text.
- Official ComfyUI SDXL example PNG, fixed revision — Original example from the upstream repository at f9431bb000ce. Use its raw/original download. The checked 1024 × 1024 PNG has SHA-256 038bf565ca4db12e070db3507bed9a6242f0d5200a392962172a207af32ad941; this site does not mirror it.
- Official ComfyUI workflow metadata documentation — Explains the distinct workflow and prompt fields and why save settings or later file rewrites can affect their presence. Documentation checked 18 October 2026; this site's reader supports PNG text, not every documented media format.
Extract both stored JSON fields
Step 1
Read the PNG in the from-image tool
Open ComfyUI workflow from image and choose the original SDXL PNG. Expect two text fields and the original 1024 × 1024 dimensions. The local operation reads the file without uploading it or executing nodes.
Step 2
Inspect the API prompt occurrence
Expand prompt and click Inspect stored JSON. It is api-prompt with 11 nodes and 15 stored connection references. The original text is 1690 characters. The known-loader list resolves two checkpoint strings, sd_xl_base_1.0.safetensors and sd_xl_refiner_1.0.safetensors, from nodes 4 and 12.
Step 3
Inspect the UI workflow occurrence separately
Expand workflow and click Inspect stored JSON for that field. It is workflow-0.4 with 24 node entries and 23 connections. The original has 16109 characters. This representation also contains UI-oriented Note and PrimitiveNode entries; a different count alone is not evidence that the API document lost the image's generation history.
Step 4
Download the exact field documents
Click Download JSON within each original field. prompt downloads as png-field-1.json and workflow as png-field-2.json. Copy field also copies the stored string. Keep each file's role in your local naming: downloading an API prompt does not convert it into a UI workflow.
Open the saved document directly
Choose either downloaded JSON in the direct JSON viewer. Its recognized representation and node count should match the same field's from-image view. Use Search ID, type or title, Filter node type and the connection endpoint buttons to locate stored nodes. Download original JSON preserves the exact input text and numeric tokens; it does not add missing models or extensions.
The saved checkpoint references are filenames, not checkpoint weights. The PNG's JSON does not contain those model files. The fixed base catalog also excludes frontend-only types: Note and PrimitiveNode in this official UI example are outside that catalog's scope. An unknown catalog label is not a finding that a plugin is missing or that the file is malicious.
- Inspect a downloaded JSON document — Direct file/paste input has separate limits from PNG text extraction.
- Official base-node definitions and fixed reference catalog — Pinned ce1e922d8623: 65 names in nodes.py's base NODE_CLASS_MAPPINGS and explicit known-loader adapters. Core extras, frontend-only nodes, installed custom nodes and later versions are outside this catalog.
Try a prompt-only PNG and an empty PNG
Step 1
Read the one-field control
Choose prompt-only.png. It is a separate self-authored 1 × 1 file with one 185-character prompt field after IDAT. Inspect stored JSON reports api-prompt with two nodes, one connection and one checkpoint reference. No workflow field is invented from the API representation.
Step 2
Read the missing-text control
Choose empty.png. There are no embedded text fields and no graph to extract. Obtaining a screenshot or a rewritten copy cannot make this reader recover JSON that is absent from these bytes.
- Download the prompt-only PNG — One supported API prompt occurrence in the same self-authored pixels.
- Download the PNG without stored text — A defined metadata-free version of the same project-authored 1 × 1 pixels. No parameters or workflow are inferred from its image data.
Keep extraction limits and runtime questions separate
PNG extraction is limited to 10 MiB, 32 text fields, 256 KiB per field and 1 MiB decoded text, plus embedded JSON traversal bounds. The direct viewer instead accepts up to 5 MiB, 1000 nodes, 10000 links, depth 64 and 150000 values. A JSON document can fit the direct viewer but exceed the tighter PNG-field budget.
Malformed JSON, unknown shape, corrupted PNG text or unsupported decompression are visible failures or warnings. Do not post raw documents until you have reviewed prompts, absolute paths, notes and extension fields. Parsing, listing dependencies and retaining exact bytes do not establish runtime compatibility, safe execution or authorship.
Sources and reproducible inputs
- Official ComfyUI SDXL example PNG, fixed revision — Original example from the upstream repository at f9431bb000ce. Use its raw/original download. The checked 1024 × 1024 PNG has SHA-256 038bf565ca4db12e070db3507bed9a6242f0d5200a392962172a207af32ad941; this site does not mirror it.
- Official ComfyUI workflow metadata documentation — Explains the distinct workflow and prompt fields and why save settings or later file rewrites can affect their presence. Documentation checked 18 October 2026; this site's reader supports PNG text, not every documented media format.
- Official ComfyUI UI workflow JSON 0.4 specification — Versioned format reference for nodes, widget values and link tuples. Reading supported structure does not certify complete schema compliance or runtime compatibility.
- Official API prompt example, fixed revision — Reference ce1e922d8623; only its stored prompt_text was read. The seven-node JSON example yields nine connections and one checkpoint reference. Its Python/network code is not run.
- Official base-node definitions and fixed reference catalog — Pinned ce1e922d8623: 65 names in nodes.py's base NODE_CLASS_MAPPINGS and explicit known-loader adapters. Core extras, frontend-only nodes, installed custom nodes and later versions are outside this catalog.
Continue with your file
- Recognize the two JSON representations — Browse nodes and inputs without pretending to convert between formats.
- Export stored model references — Keep known literals separate from unknown nodes and connected values.
- Choose a workflow inspection task — Start from a PNG, a JSON file or an unrecognized document.