Guides

Stable Diffusion and ComfyUI PNG parameter blocks

Local generators write the full prompt, sampler, seed and model name into PNG text chunks. Once you know the parameters, prompt and workflow blocks, the origin is obvious.

What PNG text chunks are

PNG allows arbitrary key/value text outside the image data, in chunks of type tEXt (Latin-1), iTXt (UTF-8) and zTXt (compressed). Generators use them to record generation settings so a picture can be reproduced later.

AUTOMATIC1111 / Forge / SD.Next

Key parameters, value is multi-line text:

a cat sitting on a windowsill, masterpiece, best quality
Negative prompt: blurry, lowres
Steps: 28, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1234567890, Size: 832x1216, Model hash: 31e35c80fc, Model: animagineXL_v31, VAE: sdxl_vae.safetensors, Version: v1.9.4

The first line is the positive prompt, the line starting Negative prompt: the negative one, and the last line is comma-separated settings. Model: names the checkpoint and Model hash: lets you look it up precisely.

When saved as JPEG the same text goes into the EXIF UserComment.

ComfyUI

Writes two chunks:

  • prompt: JSON mapping node IDs to node definitions with class_type (such as KSampler, CheckpointLoaderSimple) and inputs.
  • workflow: JSON of the whole canvas, which can be dragged back into ComfyUI to reproduce.

Both present together is as close to certain as it gets that ComfyUI generated or processed the picture.

NovelAI

Written in the Comment chunk as JSON. The telltale fields are "uc" (undesired content, the negative prompt), "steps" and "sampler". The Software chunk says NovelAI.

InvokeAI, Fooocus, Draw Things and others

Each has its own keys, usually containing invokeai_metadata, fooocus_scheme, or the tool name inside parameters. AuditImage matches those names as keywords.

How AuditImage detects them

  • parameters present: flagged as Stable Diffusion WebUI parameters, with the model name after Model: extracted.
  • prompt and workflow both present: flagged as a ComfyUI workflow.
  • Comment containing "uc":: flagged as NovelAI.
  • Every chunk is listed verbatim under "PNG text chunks".

Do they survive

No. Any re-encode drops PNG text chunks, including conversion to JPEG or WebP and most social platforms. Some tools' "export" also removes them. So a PNG with no metadata at all does not tell you it was not AI-generated.

Manual check

exiftool -a -G1 -s -PNG:all image.png
# or
python -c "from PIL import Image; print(Image.open('image.png').text)"