Stable Diffusion web UIWorkflow & organisation

A1111 PNG Info: Save and Recover Prompts from Images

By Marco Cavazzana · Updated · 4 min read
ShareEmail
Short answer

The AUTOMATIC1111 web UI writes the prompt, negative prompt, steps, sampler, CFG scale, seed, size and model hash into every PNG it saves. Open the PNG Info tab, drop an image in, and the parameters appear with buttons to send them to txt2img or img2img. The data is lost if the image is converted to JPEG or passed through social media, so archive the original PNGs.

Every image the Stable Diffusion web UI (AUTOMATIC1111, and the Forge fork) saves carries its own recipe. The prompt, negative prompt, sampler, steps, CFG scale, seed, size, model name and hash, and any hires. fix or LoRA details are written into the PNG as a text chunk. The PNG Info tab reads it back and can restore the whole set-up in one click. This guide covers how that works, what breaks it, and how to organise outputs so you can find the right image a year later.

What is stored in the image

Look at any A1111 output in a metadata viewer and you will find a "parameters" field. It holds the prompt on the first lines, "Negative prompt:" on the next, then a single line of comma-separated settings: Steps, Sampler, Schedule type (in newer versions), CFG scale, Seed, Size, Model hash, Model, and extra entries when used, such as Denoising strength, Hires upscale, Hires upscaler, Lora hashes and the version of the web UI. Anything in the Styles dropdown that was applied is expanded into the prompt text, so what you read is what actually ran.

This happens by default. The option is under Settings, in the saving section, labelled along the lines of "Save text information about generation parameters as chunks to png files". A neighbouring option writes a separate .txt file next to each image with the same text, which is useful if you expect to convert images and lose the chunk.

Using the PNG Info tab

  1. Open PNG Info in the top row of tabs.
  2. Drop an image in or click to browse. The parameters appear as text on the right.
  3. Click "Send to txt2img" (or img2img, inpaint, extras). The prompt, negative prompt, sampler, steps, CFG, seed and size are filled in. The checkpoint switches too if a model with that hash is installed.
  4. Generate. With the same model, same seed and same settings you get the same image, which is the test that your archive is complete.

There is a shortcut on the txt2img tab itself: paste the parameter text into the prompt box and click the small arrow button beside Generate (its tooltip reads something like "Read generation parameters from prompt"). The UI parses the text and distributes the values into the right fields. That means a plain-text copy of the parameters is as good as the image for restoring a set-up.

What strips the metadata

  • JPEG and WebP conversion. The chunk is PNG-specific. The web UI can save JPEG directly, and then the parameters go into EXIF instead, which many tools still drop.
  • Social and messaging platforms. Almost all re-encode uploads.
  • Screenshots and copy-paste of the pixels. Only the file carries the text.
  • Some photo editors discard unknown text chunks on save. Test yours once by saving a copy and dropping it into PNG Info.
  • Grid images. The batch grid stores the parameters of the first image and the prompt matrix or X/Y/Z plot settings, not every cell. Keep the individual images.

Copying, renaming and syncing to cloud storage all preserve the chunk.

Filenames and folders

By default A1111 saves to outputs/txt2img-images in a dated subfolder, named with a counter and a slice of the prompt. Under Settings you can change the filename pattern with tokens such as [seed], [model_name], [sampler], [cfg], [steps], [date] and [prompt_spaces], and the output directory pattern the same way. A pattern that puts the model and seed first makes a folder scannable without opening files.

Keep the Styles dropdown for recurring prompt fragments: a client’s look, a lighting recipe, your standard negative prompt. Styles save prompt and negative prompt only, not sampler or size, so the PNG remains the complete record. For comparing this approach across tools, see how to track prompts across AI tools; for what the settings themselves mean, see A1111 settings explained.

Settings at a glance

SettingWhat it doesStart with
Save parameters as PNG chunksEmbeds prompt and settings in every PNGOn (default)
Create a text file next to every imageWrites the same parameters as .txtOn if you convert images often
File formatPNG keeps the chunk; JPEG moves it to EXIFPNG for archive
Images filename patternToken-based naming[model_name]-[seed]-[prompt_spaces]
Directory patternSubfolder naming[date] or a project token you edit per job
Save gridsWrites the batch grid imageOff unless you use grids for review
StylesSaved prompt and negative prompt presetsOne per client look, one for your negative prompt

A simple archive routine

At the end of a session, move the keepers into a project folder as PNGs, untouched. Export delivery copies as JPEG from there. Paste the parameter text of the final selects into a notes file in the same folder, because text survives everything. When a client comes back for "the same but blue", you drop the PNG into PNG Info, send to txt2img, change one word and generate.

Try it

Settings > Saving images:
  Images filename pattern:  [model_name]-[seed]-[prompt_spaces]
  Directory for txt2img images: outputs/txt2img-images/[date]
  Save text information about generation parameters as chunks: on
  Create a text file next to every image: on

Generate one image, then drag it into PNG Info and click Send to txt2img. If every field comes back and the regenerated image matches, your archive is complete. Then try the same with a JPEG copy to see what you would lose.

Frequently asked questions

How do I see the prompt used for a Stable Diffusion image in A1111?
Open the PNG Info tab and drop the image in. If it was saved by the web UI as a PNG and not converted since, the prompt, negative prompt, sampler, steps, CFG scale, seed, size and model hash appear on the right, with buttons to send them straight to txt2img or img2img.
Why does PNG Info show nothing for my image?
The metadata was stripped. Converting to JPEG, uploading to social media, taking a screenshot or saving from some editors removes the PNG text chunk. Go back to the original file in the outputs folder, or to the .txt sidecar if you enabled that option in Settings.
Can I restore settings from a copied prompt text in A1111?
Yes. Paste the full parameter text, including the Steps and Seed line, into the txt2img prompt box and click the small arrow button near Generate that reads generation parameters. The UI fills every field from the text, so a plain-text copy is a valid backup of your settings.

Nothing you makeis lost.

Free when it launches · No card · Read-only

DreamdriveComing to Chrome
Join the waiting list