How-to

Removing prompts and workflows from Stable Diffusion and ComfyUI images

What AUTOMATIC1111 and ComfyUI write into your images, read from their source code, and two ways to take it out again.

Updated 24 September 2026

Run exiftool -a -G1 -s on a PNG saved by AUTOMATIC1111 and one of the lines is labelled Parameters. It holds your prompt, then your negative prompt, then a comma-separated line of settings with the seed, the sampler, the CFG scale and the model’s name and hash. This is the “PNG Info” that Stable Diffusion users paste into each other’s interfaces. ComfyUI goes further and saves the whole graph. Both are switched on by default.

What each interface writes, read from its source code

We read the current code on GitHub rather than trusting forum descriptions, because both projects have added fields over time. File names and option labels below are as they appear in the code on 23 September 2026.

AUTOMATIC1111. The function save_image_with_geninfo in modules/images.py writes the generation text to a PNG text entry under the key parameters. It goes through Pillow’s add_text, which stores it as a plain tEXt chunk unless the text has characters outside Latin-1, such as an emoji or a Japanese prompt, in which case Pillow writes an iTXt chunk instead. The text itself is built by create_infotext in modules/processing.py, and with the default settings it can include:

  • the prompt and the negative prompt, exactly as typed
  • steps, sampler, schedule type, CFG scale, seed and size
  • model hash and model name, VAE hash and VAE name (each has its own switch in Settings, all on by default)
  • a Lora hashes entry listing each LoRA by name with its hash, added by the built-in LoRA extension when its own setting is on, which it is by default
  • the program version
  • your user name, but only if you turned on “Add user name to infotext when authenticated”, which is off by default

ComfyUI. The SaveImage node in nodes.py writes two text chunks. The one called prompt is the graph that actually ran, as JSON: every node and every input, which means the text of each prompt node, each seed, each checkpoint name and each LoRA name. The one called workflow comes from the editor (the front end sends it as extra_pnginfo) and holds the editable graph with its layout. A LoadImage node’s input is the file name of the picture you loaded, so if you started from a photo called IMG_2041.jpg, that name travels in both chunks.

Where generation data lands by format, from the AUTOMATIC1111 and ComfyUI source, 23 September 2026
Saved asAUTOMATIC1111ComfyUI
PNGtEXt or iTXt chunk, key “parameters”tEXt chunks “prompt” and “workflow”
JPEGEXIF UserComment, inserted after savingThe core SaveImage node saves PNG only
WebPEXIF UserCommentAnimated WebP node: EXIF Model tag holds the prompt, Make holds the workflow
AVIFEXIF UserCommentEXIF, same prompt and workflow scheme

The ComfyUI WebP detail surprised us. The Save Animated WEBP node reuses two ordinary camera fields, so a photo viewer that shows Make and Model will display a wall of JSON where a camera name would be.

We think a ComfyUI file gives away more than an AUTOMATIC1111 one. The A1111 text is a summary written to let someone reproduce the picture, and the code’s own help text says as much: infotext “can be used to generate the same picture again”. ComfyUI’s chunks are the full working graph, including nodes that didn’t matter to the output, notes you left on the canvas, and the names of files on your machine.

Stop it at the source

If you never want this data in a shared file, turn it off where it is written. In AUTOMATIC1111 it is the setting “Write infotext to metadata of the generated image” in the Infotext section. ComfyUI has a launch flag, --disable-metadata, whose help text reads “Disable saving prompt metadata in files.” Keep a copy with the data for yourself; being able to reload an old graph is the reason the feature exists.

Cleaning files that are already out

We built a test PNG with the three keys above (a fake A1111 parameters entry naming a LoRA, and ComfyUI-style prompt and workflow entries naming a checkpoint and a holiday photo) plus an sRGB colour chunk, then ran it through ExifTool and through our own lossless cleaning step.

ExifTool 13.55 with exiftool -all= test.png removed all three text entries. It also removed the sRGB chunk, and adding -tagsfromfile @ -colorspacetags to copy colour tags back reported that there was nothing it could write. Deleting one entry by name was worse: -Prompt= returned “Tag ‘Prompt’ is not defined” and left the ComfyUI graph in the file. Our cleaning step removed all three entries and kept the sRGB chunk; its source drops compressed zTXt and international iTXt text the same way, and for JPEG and WebP it drops the EXIF block where the UserComment and the repurposed Make and Model fields live (a JPEG keeps only its Orientation tag). In the Wipe tool that step is followed by a pass that changes the pixels. To take only the text out and keep the pixels exactly as they were, use our free AI prompt remover, which runs the cleaning step alone. The comparison of ExifTool, screenshots and our tool sets out what each one costs the image.

What the prompt remover took out of 15 real files

On 24 September 2026 we ran the remover in Chromium on the seven example images from ComfyUI’s own examples site, and on the first 30 files we downloaded from Wikimedia Commons’ Stable Diffusion category. Eight of those 30, all PNG, still carried an AUTOMATIC1111 parameters entry; the other 22, JPEG and WebP included, had no prompt left to remove.

Generation text removed by our free tool, 24 September 2026 (n=15 public PNGs; sizes in bytes)
FilesEntries removedBytes removed per filePixels after
7 ComfyUI examples (SDXL, SD 3.5, Flux dev and schnell, LoRA, hires fix, inpaint)“prompt” and “workflow”, both tEXt4,381 to 17,839identical in all 7
7 AUTOMATIC1111 PNGs from Commons“parameters” (tEXt)268 to 528identical in all 7
1 AUTOMATIC1111 PNG upscaled in the Extras tab“parameters”, “postprocessing”, “extras”1,141identical

The workflow is the heavy part. In the ComfyUI files it ran from 3,356 bytes (the LoRA example) to 16,130 bytes (the SDXL one), three to nine times the size of the prompt entry next to it, because it stores node positions and every widget value for the editor. The AUTOMATIC1111 entries are short by comparison, but short is not harmless: all eight hold the prompt, the seed and the model hash, the details A1111’s help text says are there to generate the same picture again. The upscaled file also named its upscaler, R-ESRGAN 4x+, in two extra entries that a filter looking only for parameters would miss. Our remover drops every text entry whatever its name.

To check that the pictures were untouched we did two things. The tool itself compares the image chunks of the output with the original (header, palette, transparency and every IDAT byte) and says so on each row; all 15 matched. Separately, we decoded each original and each output to raw RGBA pixels in Chromium 153 and hashed both; all 15 pairs gave the same SHA-256. We also built three PNGs of our own to cover what the public files didn’t: the prompt as an iTXt entry with Japanese text and an emoji, a ComfyUI graph stored as compressed zTXt, and a 36 MB, 4000 by 3000 PNG. All three came out with no text entries and identical pixels, and the 36 MB file took 375 milliseconds.

That test also caught a bug. Our cleaner used to drop the tRNS chunk, which holds the transparency of palette PNGs, so a sticker saved with a see-through background came out solid. It keeps that chunk now.

We haven’t repeated the ExifTool test with an embedded ICC profile (iCCP). A missing sRGB chunk rarely changes how a picture looks; a missing wide-gamut profile can.

Re-saving through an image editor is the other free route. For a JPEG it means a second round of compression. For a PNG the pixels come through intact, but whether the text chunks survive depends on the program, so check the result with the ExifTool command at the top of this page before you post it.

Generation text is only the metadata layer. Neither interface writes a C2PA manifest, and we found no watermark code in the save paths we read, which the table of what each generator adds sets against the commercial tools. If the same file also has camera data from a source photo, the guide to removing GPS and EXIF covers that part, and the stock SaveImage node is about sixty lines, worth reading if you want to check a custom save node against it.

Sources

  1. AUTOMATIC1111 stable-diffusion-webui: modules/images.py (save_image_with_geninfo)
  2. AUTOMATIC1111 stable-diffusion-webui: modules/processing.py (create_infotext)
  3. AUTOMATIC1111 stable-diffusion-webui: modules/shared_options.py (Infotext settings)
  4. AUTOMATIC1111 stable-diffusion-webui: built-in LoRA extension (Lora hashes)
  5. ComfyUI: nodes.py (SaveImage, LoadImage)
  6. ComfyUI: comfy_api/latest/_ui.py (WebP metadata)
  7. ComfyUI: comfy/cli_args.py (--disable-metadata)
  8. ComfyUI front end: src/scripts/api.ts (extra_pnginfo workflow)
  9. Pillow: PngImagePlugin.py (add_text falls back to iTXt)
  10. ExifTool application documentation
  11. ComfyUI examples (the seven example images tested)
  12. Wikimedia Commons: Images generated by Stable Diffusion