Stable Diffusion web UIWorkflow & organisation
A1111 PNG Info: Save and Recover Prompts from Images
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
- Open PNG Info in the top row of tabs.
- Drop an image in or click to browse. The parameters appear as text on the right.
- 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.
- 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
| Setting | What it does | Start with |
|---|---|---|
| Save parameters as PNG chunks | Embeds prompt and settings in every PNG | On (default) |
| Create a text file next to every image | Writes the same parameters as .txt | On if you convert images often |
| File format | PNG keeps the chunk; JPEG moves it to EXIF | PNG for archive |
| Images filename pattern | Token-based naming | [model_name]-[seed]-[prompt_spaces] |
| Directory pattern | Subfolder naming | [date] or a project token you edit per job |
| Save grids | Writes the batch grid image | Off unless you use grids for review |
| Styles | Saved prompt and negative prompt presets | One 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.