ai-image
How ComfyUI workflow data is stored in PNG images
The graph is often in the PNG. The pixels are not the whole file.
By ConvertPass testing desk. Last reviewed 16 August 2026.
PNG is a chain of chunks
After the eight-byte signature, a PNG is length + type + data + CRC, repeated until IEND. IHDR holds width and height. IDAT holds compressed pixels. Ancillary chunks can hold text without touching pixels.
tEXt is a keyword, a null byte, then a payload. ComfyUI commonly uses the keywords prompt and workflow. prompt is the API-style node graph. workflow is the UI graph with positions and links.
What we tested
The PNG chunk inspector was unit-tested against a synthetic PNG with an IHDR, a tEXt chunk, and IEND. The keyword and payload round-tripped. CRC failures are reported rather than ignored.
Interpreted fields such as sampler names from widget arrays are guesses. The raw JSON is the source of truth. ConvertPass labels missing fields as unknown.
If the chunks are missing
Saving through an editor, uploading to a social network, or converting via canvas will often drop tEXt. That does not prove the image was not generated. See the guide on missing prompt data.
Related tools
- PNG chunk inspector
See every PNG chunk, including the ones that hide prompts.
- ComfyUI workflow extractor
Pull ComfyUI workflow JSON out of a PNG when the chunks are still there.
- AI-image metadata viewer
See whether an image still contains AI prompts — and say so only when it does.
Related guides
Related formats
Found a problem in this guide? Report it.