What Stable Diffusion writes into an export
Stable Diffusion is a set of models, and a model does not write files by itself. The application around it does. Automatic1111, ComfyUI, Forge and InvokeAI all save a record of the generation into the image they export, and that record is where the prompt, the seed and the sampler settings live. On a PNG the record sits in the text chunks the format reserves for it: tEXt, zTXt and iTXt, defined in the W3C PNG specification at https://www.w3.org/TR/png-3/. JPEG and WebP files can carry the same information in EXIF or XMP instead, which is why the panel accepts all three formats.
Automatic1111 writes generation information to PNG as a text chunk. The project describes the PNG info feature that way in its own feature list at https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features. The chunk is keyed parameters and holds one block of text: the positive prompt, the Negative prompt line, Steps, Sampler, CFG scale, Seed, Size, Model hash, Model and Version. Open the file in the web UI and the PNG Info tab parses that block back into form fields. Anyone else who has the file can read the same block, copy the exact prompt, and rerun the seed.
ComfyUI takes a different shape. Its output nodes write two JSON fields into the PNG as text entries, named prompt and workflow. The official metadata documentation at https://docs.comfy.org/development/api-development/workflow-metadata describes prompt as the API prompt used to execute the workflow, and workflow as the complete graph, nodes, links and layout included. Custom nodes can add more fields through extra_pnginfo. A file may carry one field without the other, depending on how the workflow ran.
A hosted service can add a layer on top. A generation made through an online hub, a model playground or a stock integration may carry a C2PA manifest store or an IPTC source type beside the local chunks. The C2PA specification site at https://c2pa.org/ describes a signed, tamper-evident provenance record. A local install rarely writes one, but a file that has passed through a service can carry both the plain text chunk and the signed record. The strip removes either when it is present.
How the ComfyUI workflow chunk differs from the prompt chunk
The two ComfyUI fields answer different questions. The workflow field is the canvas you built: node positions, links, groups, colors and every widget value as the editor holds it. The prompt field is the form the backend received after the frontend resolved that canvas, so it drops muted or disconnected nodes and keeps numeric node ids, class types and inputs. ComfyUI rebuilds the canvas from workflow when a file carries both. That is why you can drag a saved PNG onto the ComfyUI canvas and get the graph back.
The leak is wider than one prompt. A workflow graph records the node class types it used and the widget values they held, including the checkpoint and LoRA file names, the sampler, the scheduler, the seed, the resolution and the text encoders. The graph does not bundle the model files, input assets or custom node packages themselves, so a recovered workflow can still fail to run without them. An API prompt repeats the inputs in a compact form. For a shared image, that is your whole pipeline in readable JSON, attached to a file that looks like a picture. A workflow JSON can also run to tens of kilobytes, which is why a ComfyUI export can be much larger than its pixel dimensions suggest.
Stripping the record does not change what the picture shows. PNG and JPEG keep their pixels intact without a lossy re-encode, and the frame you see stays the frame that was generated. What leaves is the recipe: the prompt text, the seed, the model names and the node graph.
Automatic1111 packs the same kind of information into a single text block rather than two JSON documents. The parameters chunk is smaller and easier to read, and it carries the prompt and the seed in plain language. A tool that reads PNG info can parse it without knowing anything about ComfyUI, which is one reason the chunk travels so easily between people who share images and settings.
How to keep prompts and seeds out of an export
Turn the exporter setting off at the source
ComfyUI accepts a --disable-metadata start flag, and ComfyUI Desktop exposes the same switch under Settings then Server-Config as Disable saving prompt metadata in files. Files made with the setting on cannot restore a workflow from embedded metadata. Turning it off before a session is the cleanest fix, because nothing is written in the first place. The trade-off is that you also lose drag-and-drop workflow recovery.
Revisit the PNG info option in Automatic1111
Automatic1111 keeps its PNG info setting in the Settings tab, under the option that saves text information about generation parameters as chunks to PNG. Clear it if you want exports without the parameters block. The setting name has moved between versions, so read the label in your build rather than following a screenshot from another release.
Strip the file you are about to share
Once an image leaves your machine it has copies you cannot edit. The file you can still fix is the local export. Run the metadata strip on the exact copy you plan to send, then upload that copy. If you resize, crop or convert afterwards, check the result again, because the new export can carry its own chunk from the editor that wrote it.
Do not trust a conversion to do the cleaning
A screenshot or a chat app may drop the parameters chunk, or it may re-encode the image and leave a different record in its place. The outcome varies by app and by version. A deliberate strip gives you a known result and a report of what was found, while a conversion gives you a guess about what survived.
How it works
How to strip Stable Diffusion metadata from a PNG
Step 1: Upload the export
Drop a PNG, JPEG or WebP file into the panel below, or click to browse. The file goes from your browser to processing storage and is not published anywhere. The original on your disk stays untouched until the strip runs, so you can compare the two files afterwards if you want to.
Tip
Start from the file your generator wrote. A copy saved from a chat thread may already have lost the chunk you wanted to inspect.
Step 2: Run the metadata strip
The panel loads the image metadata pass with removal enabled, so there is nothing to configure. The job reads the file and removes the generator chunks it recognizes: a parameters block, a prompt or negative_prompt field, a workflow graph, sd-metadata and invokeai_metadata keys, plus any C2PA store and AI-bearing EXIF tags. PNG and JPEG keep their pixels intact without a lossy re-encode, WebP is rewritten when the output is saved, and standard fields stay in place.
Tip
Credits are used only when a strip job actually runs.
Step 3: Download and share
When the job finishes, download the cleaned image and open it once before you send it. The frame should look like the one you uploaded. Upload the cleaned file directly to the place you are sharing it. Signed out, the page asks you to sign in, then brings the panel back.
Tip
If you edit the file after the strip, run it again. An editor can write a fresh metadata chunk into the new export.
Limitations and what the strip leaves alone
Where to go next
The AI Metadata Remover page covers the general case for images from any generator, including the C2PA and IPTC records that hosted services attach. The Remove Metadata page handles the personal layer, the GPS, device and timestamp fields this page keeps by default. For FLUX exports and the text chunks that tool writes, the FLUX Metadata Remover page is the matching entry, and it covers a generator whose defaults differ from the Stable Diffusion apps described here.
The facts on this page come from official sources. ComfyUI’s workflow metadata documentation, including the prompt and workflow fields and the --disable-metadata flag, is at https://docs.comfy.org/development/api-development/workflow-metadata. The AUTOMATIC1111 feature list, which describes PNG info as generation parameters stored in a PNG text chunk, is at https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features. The W3C PNG specification defines the tEXt, zTXt and iTXt chunks at https://www.w3.org/TR/png-3/, and the C2PA specification site is at https://c2pa.org/.
Sign in to run. Free credits included.
FAQ
Frequently asked questions
Short answers about the prompt, seed and workflow records in a Stable Diffusion export, and what a metadata strip can change.
Explore more tools
AI Metadata Remover
The general page for generator records in any image, including the C2PA and IPTC fields that hosted services attach.
Remove Metadata
The privacy pass for location, device and timestamp fields, for when the personal layer matters as much as the prompt.
FLUX Metadata Remover
The matching page for FLUX exports, whose defaults and text chunks differ from the Stable Diffusion apps described here.
Image Metadata Viewer
See the prompt, seed and workflow chunks inside a PNG before the strip.
C2PA Remover
The credential record on its own, for exports that also carry Content Credentials.
Grok Metadata Remover
Strips the metadata in Grok image exports. The visible watermark xAI documents is a separate layer.
All tools
Every remover and detector on one page, grouped by what each one cleans or checks.
Strip the prompt and the seed before you share
One metadata pass clears the parameters chunk, the ComfyUI prompt and workflow JSON, and any C2PA record, while PNG and JPEG keep their pixels intact without a lossy re-encode.