How to Remove Stable Diffusion and ComfyUI Prompts from PNG Files

How to strip prompts, negative prompts, seeds, LoRA tags, and ComfyUI workflow JSON from PNG files losslessly without breaking color or quality.

Traditional EXIF removers and Windows File Properties often fail on Stable Diffusion and ComfyUI PNGs because generation prompts, negative prompts, seeds, model hashes, and node workflows are stored inside PNG tEXt, zTXt, and iTXt chunks rather than standard EXIF segments. Stripping those chunks at the binary level removes every generation parameter without recompressing pixels, degrading alpha transparency, or altering color profiles.

For Etsy sellers, print-on-demand (POD) creators, and freelance illustrators, cleaning PNG text chunks prevents accidental prompt leaks, LoRA name exposure, and bloated workflow file sizes before handing files to clients.

What Stable Diffusion, Automatic1111, and ComfyUI store inside PNG chunks

Unlike JPEG camera photos that place settings in APP1 EXIF, AI image UIs write full generation recipes directly into PNG ancillary text chunks:

Generator / UI PNG Chunk Type What Gets Embedded in the File
Automatic1111 / Forge tEXt:parameters Positive prompt, negative prompt, Steps, Sampler, CFG scale, Seed, Size, Model hash, Model name, LoRA tags
ComfyUI tEXt:prompt and tEXt:workflow (or compressed zTXt) Complete node graph JSON, custom node types, checkpoint filenames, VAE paths, and conditioning text
NovelAI / InvokeAI tEXt or compressed iTXt / zTXt Prompt strings, software version, seed, sampler config, and generation JSON
Midjourney PNG exports tEXt:Description, Author, Creation Time Prompt text, Job ID, user handle, and timestamp

Because zTXt and iTXt chunks can use zlib compression, opening a PNG in a basic text editor or running a naive keyword search frequently misses compressed ComfyUI workflows. A proper parser must inflate zlib-compressed chunks to inspect and verify them accurately.

Why Windows Properties and basic EXIF tools miss PNG prompts

If you right-click a Stable Diffusion PNG on Windows and select Properties -> Details -> Remove Properties and Personal Information, Windows only targets standard EXIF/IPTC property schemas. It routinely leaves tEXt:parameters and tEXt:workflow intact.

Similarly, many browser-based "EXIF cleaners" only parse APP1 segments inside JPEG files and either reject PNGs or pass non-standard text chunks straight through unchanged.

Method 1: Strip PNG prompts locally in your browser (batch up to 30 files)

You can inspect and strip all PNG prompt chunks in local browser memory with zero file uploads using our Remove AI Metadata from Photos workbench:

  1. Inspect what is inside (optional): Drop your PNGs into the AI Metadata Checker first. Our parser inflates compressed zTXt and iTXt chunks locally, revealing hidden parameters, prompt, workflow, negative prompts, seeds, and model hashes.
  2. Strip chunks losslessly: Click Wipe Metadata in default Lossless Header Strip mode. The binary cleaner drops tEXt, zTXt, iTXt, caBX, eXIf, and tIME chunks while copying IHDR, PLTE, tRNS (alpha transparency), and IDAT pixel chunks bit-for-bit.
  3. Keep accurate colors: Preserve ICC color profile stays checked by default, keeping iCCP and sRGB chunks intact so illustrations never look washed out.
  4. Download single PNG or offline ZIP: Cleaning 2 to 30 PNGs creates a single local ZIP archive using fast zero-recompression framing.
  5. Verify output: Click Verify Cleaned File on the receipt card to confirm 0 AI tags and Pixels Changed: None (Lossless).

Method 2: ExifTool and ImageMagick command-line options

If you prefer terminal automation on local directories:

ExifTool (lossless PNG chunk removal while preserving ICC color):

exiftool -all= -PNG:all= --icc_profile:all -overwrite_original *.png

Note that ExifTool deletes standard PNG text chunks cleanly, though certain non-standard custom chunks may require verifying afterwards with:

exiftool -a -u -G1 -s clean.png

ImageMagick (re-encodes PNG pixels):

magick input.png -strip output.png

magick -strip removes tEXt, zTXt, iTXt, and comments, but it also strips iCCP color profiles and re-encodes the PNG, which can noticeably change file size or color appearance unless you preserve the profile separately.

Comparison: stripping PNG prompts without breaking transparency or color

Method Removes tEXt, zTXt, iTXt Preserves IDAT Pixels Losslessly Keeps iCCP / sRGB Color Handles Batch without CLI
Wipe AI Metadata (Browser) Yes (inflates and drops all) Yes (bit-for-bit copy) Yes (by default) Yes (up to 30 PNGs -> ZIP)
ExifTool (-all=) Yes Yes Only with --icc_profile:all CLI command required
ImageMagick (-strip) Yes No (re-encodes PNG) No (drops ICC too) CLI command required
Windows Properties No (frequently leaves prompts) Yes Yes Yes, but unreliable

Does stripping PNG prompts affect pixel watermarks or AI detectors?

No. Deleting tEXt, zTXt, iTXt, and caBX chunks removes embedded text prompts, seeds, model hashes, and workflow JSON from the file header only. It does not remove invisible pixel-level watermarks (such as Google SynthID) and does not prevent visual or statistical AI image classifiers from analyzing pixel textures.

Always keep a private backup of your original PNGs if you ever want to reproduce a seed or ComfyUI node graph later, and follow platform disclosure rules on Etsy, Adobe Stock, or social networks. See our Technical Disclaimer and Privacy Policy for full details.

Related tools and guides

Remove AI Metadata from Photos Batch strip PNG prompts, C2PA, and EXIF locally up to 30 files. AI Metadata Checker Inspect compressed PNG zTXt workflows in read-only mode. Remove Metadata from ChatGPT Images Learn how to strip ChatGPT C2PA headers losslessly.

Frequently asked questions

Why did Windows Remove Properties leave my Stable Diffusion prompt inside the PNG?

Windows Properties targets standard EXIF and IPTC property schemas, whereas Stable Diffusion and ComfyUI store prompts, seeds, and workflow JSON inside PNG tEXt and compressed zTXt chunks.

Does removing PNG text chunks affect image transparency or pixel quality?

No. Lossless PNG header stripping drops ancillary metadata chunks (tEXt, zTXt, iTXt, caBX, eXIf, tIME) while copying IHDR, PLTE, tRNS alpha transparency, and IDAT image chunks unchanged.

Does this remove zlib-compressed ComfyUI workflows inside zTXt chunks?

Yes. Our browser parser includes a local zlib decompressor that inflates compressed zTXt and iTXt chunks during inspection and drops those chunks completely when wiping.

Will stripping PNG metadata delete my sRGB or Display P3 color profile?

No. Both iCCP ICC profiles and sRGB chunks are preserved by default so illustrations keep exact color accuracy across browsers and print workflows.

Can I clean 20 or 30 ComfyUI PNGs in one batch without uploading them?

Yes. Drop up to 30 PNG files (up to 25 MB each) at once. When 2 or more files are wiped, the tool generates a single local ZIP download directly in browser memory.