AILabelFix Clean a file

Remove Stable Diffusion and ComfyUI metadata from PNGs

AI image tools save their settings inside the PNG as text chunks (tEXt, zTXt, iTXt): Stable Diffusion web UIs write a “parameters” chunk with prompt, negative prompt, seed, sampler and model, and ComfyUI writes its whole “prompt” and “workflow” JSON. AILabelFix's PNG AI metadata remover drops every text chunk, C2PA and XMP while copying the image data byte for byte. Copies hidden inside the pixels, like NovelAI's alpha-channel data, stay.

Runs in your browser — files are never uploaded

Drop a PNG into the PNG AI metadata remover above to see what's riding along with your image: the full prompt, negative prompt, seed, sampler, model, LoRAs, the ComfyUI node graph, C2PA and XMP. One click saves a copy without any of it. The image data is copied byte for byte, so the picture is identical, and nothing leaves your browser.

What do AI tools write into a PNG?

The PNG format has three text chunks: tEXt (Latin-1 text), zTXt (the same, compressed) and iTXt (UTF-8, optionally compressed). Each holds a keyword of up to 79 bytes and a text string. The spec predefines keywords such as Title, Author, Description, Software and Comment, and lets any application define its own (W3C PNG). AI tools use that freedom:

ToolWhere it writesWhat's inside
AUTOMATIC1111-style Stable Diffusion UIstEXt keyword parametersPrompt, a “Negative prompt:” line, then steps, sampler, CFG scale, seed, model hash and model
ComfyUItEXt keywords prompt and workflowThe executed graph and the full canvas as JSON
InvokeAIinvokeai_metadata, invokeai_graph (older: sd-metadata, dream)Prompts, model and settings
NovelAItEXt chunks, including JSON in Comment, plus a copy in the alpha channelPrompt and generation settings
ChatGPT and other C2PA signerscaBX chunk and XMP in iTXtSigner, app, trainedAlgorithmicMedia

ComfyUI's documentation confirms the prompt and workflow field names and explains why they're there: drag a generated file onto the canvas and ComfyUI rebuilds the workflow from it (ComfyUI Docs).

Why prompt leakage matters

A prompt plus a seed and model name is a recipe. Anyone with the file can reproduce or riff on your image. A ComfyUI workflow goes further: it can hold file paths, LoRA names, notes, and the settings of every node on the canvas.

Sometimes it holds secrets. Truffle Security scanned 2.49 million image attachments from 10 public Discord servers, found ComfyUI metadata in 159,752 of them, and found live, verified API keys in 681 (Truffle Security). The keys came from community nodes that take an API key as a plain text field, and bypassing a node didn't help, because a bypassed node is still saved with its key. If you've shared PNGs straight out of ComfyUI, rotate any key that was in your workflow.

No major platform has published that it reads these text chunks for AI labels; C2PA and IPTC are what they describe. The checker still marks prompts red, but the stronger reason to remove them is privacy.

How does the PNG cleaner work?

It uses a chunk whitelist. It keeps what a viewer needs to draw the image and nothing else:

  • Kept: IHDR, PLTE, IDAT, IEND; color chunks (iCCP, sRGB, gAMA, cHRM, cICP, mDCV, cLLI); transparency (tRNS); pHYs, bKGD, sBIT, hIST, sPLT; APNG animation chunks; a rebuilt eXIf if you keep camera info.
  • Removed: every tEXt, zTXt and iTXt chunk, caBX (C2PA), tIME, any unknown chunk and any data appended after IEND.

Chunks are copied whole, so their checksums stay valid. In our tests, a Stable Diffusion PNG with a parameters chunk, a ComfyUI workflow, a compressed comment, a Software tag and trailing junk came out with all of it gone. A ChatGPT-style PNG lost its caBX manifest and XMP, shrank from 136 KB to 134.6 KB, and decoded to identical pixels. See ChatGPT image metadata for that case.

What it can't remove

NovelAI's own scripts read the prompt and settings from the image's alpha channel, in a format called stealth pnginfo, and NovelAI's writer also injects error-correction data there (NovelAI). That copy is pixel data. A lossless cleaner leaves pixels byte-identical, so it stays, and the checker doesn't read it. The only way to drop it is to change the pixels, for example by flattening transparency or exporting a JPG, which has no alpha channel.

The same goes for pixel watermarks such as SynthID and anything visible in the picture.

How to remove Stable Diffusion metadata from a PNG

  1. Drop your PNGs above. Batches of any size work.
  2. Open the findings. Red items such as Stable Diffusion prompt & settings or ComfyUI workflow & prompt show the start of the prompt so you know what's there.
  3. Download the cleaned files, or all of them as a ZIP.
  4. Confirm each card says Clean; the output is scanned again before you get it.
  5. Keep the originals somewhere private if you'll want to reload the workflow later.

If you use ComfyUI and Stable Diffusion a lot, there's a setting-by-setting guide. For animated WebP from ComfyUI, which keeps the workflow in EXIF tags, use the EXIF remover in strict mode, and run anything you're unsure about through the AI metadata checker first.

Questions

Will removing the metadata change how my PNG looks?

No. The cleaner keeps the image chunks (IHDR, PLTE, IDAT, IEND) and the color and transparency chunks exactly as they were, so the decoded pixels are identical. Only text and metadata chunks are dropped.

Does it remove the ComfyUI workflow?

Yes. ComfyUI stores its node graph in PNG tEXt chunks named prompt and workflow, and both are removed along with every other text chunk. Keep your original if you want to drag it back into ComfyUI later.

Can I remove the prompt but keep the workflow?

Not with this tool: it removes all text chunks, because a workflow contains the prompt anyway. Share the cleaned copy and keep the original with its workflow in your own archive.

Does it work on JPG and WebP files from AI tools?

Yes, through the same cleaner. If a generator wrote its prompt into EXIF, XMP or a JPEG comment, that's removed too. For animated WebP from ComfyUI, which stores the workflow in EXIF tags, use the strict EXIF remover so no EXIF text survives.

Sources

  1. W3C — PNG Specification, Third Edition (textual information chunks)
  2. ComfyUI Docs — Workflow metadata
  3. NovelAI — novelai-image-metadata (GitHub)
  4. Truffle Security — API keys leaking in PNG metadata of AI images