The hidden pipeline inside your generated art

When you look at an AI-generated image, you're only seeing half the file. Behind the pixels, many generative AI platforms quietly embed the exact recipe used to create that image directly into the file's code.

If you generate an image using ComfyUI, Automatic1111, or InvokeAI, the final PNG doesn't just contain color data. It carries a structural trace of your entire synthesis pipeline. This metadata lets anyone reconstruct your visual node networks, recover your exact text prompts, and audit your generation variables.

But how does a visual node graph fit inside a standard image file?

Text chunks and the anatomy of a PNG

To understand where this data lives, you have to look at how a Portable Network Graphics (PNG) file is structured. A PNG is essentially a sequence of self-contained blocks called "chunks." Some chunks are critical, like the IDAT chunks that hold the compressed pixel data.

But the PNG specification also allows for "ancillary text chunks" to store keyword-value pairs. Because these chunks are non-critical, standard image viewers ignore them and just render the picture.

AI generation frameworks hijack these text chunks to store their parameters. Depending on the complexity and character encoding, they use three distinct types:

  • tEXt (Uncompressed Text): Used for standard, short strings.
  • zTXt (Compressed Text): Compresses the text payload using the zlib algorithm. This is the standard chunk ComfyUI uses to store its massive, complex node graphs.
  • iTXt (International Text): Supports UTF-8 encoding, used when prompts contain international languages.

How ComfyUI and Automatic1111 write their metadata

Different interfaces use distinct keys and structures to record their generation blueprints.

ComfyUI writes to two primary keys: workflow and prompt. The workflow key contains a massive, serialized JSON object representing the visual state of your node canvas - including visual node coordinates, colors, and groups. The prompt key stores the actual execution graph dispatched to the backend, mapping numerical node IDs to their class types and inputs.

Automatic1111 (and its fork, Forge) takes a simpler approach. It writes a single text key named parameters. This is a multi-line plain text format. The first line contains your positive prompt, followed by your negative prompt, and finally a line of comma-separated hyperparameters (like Seed, Steps, and Sampler).

Why workflows disappear when shared online

Have you ever downloaded a ComfyUI image from a social media site, dragged it into your workspace, and found that the workflow failed to load?

This happens because social platforms re-encode uploads. When you upload an image to Discord, X (Twitter), or Instagram, their servers process the file to optimize storage. During this compression, they strip out all non-critical ancillary text chunks - including the zTXt chunk holding your ComfyUI JSON.

The original file on your hard drive had the workflow, but the version the platform serves is just a grid of pixels. To share a workflow, you must share the original, uncompressed file or export the workflow as a standalone JSON file.

How to extract parameters from a PNG

Reading a compressed zTXt chunk isn't something you can do with a standard text editor. It requires a parser that can decompress the zlib block, sanitize any malformed JSON (like rogue NaN values), and traverse the node graph.

If you want to see exactly what an image contains, you can drop it into our free, client-side Metadata Viewer. Because it runs entirely in your browser, your files are never uploaded to a server, keeping your proprietary workflows and local system paths completely private.

If you find that an image is leaking your secret prompts or private infrastructure details (like custom LoRA filenames), you can immediately pass it to our Metadata Remover to strip the ancillary chunks clean before publishing.