How to Find a Hidden AI Prompt Inside a PNG Image

Magnifying glass revealing an eye made of binary code, surrounded by image, audio and document file icons
Some PNG files can store text metadata alongside the visible image.

Some AI-generated PNG images contain the prompt and settings used to create them. Learn how to inspect the metadata and recover an embedded workflow when it is available.

AI-generated images can contain more than the pixels you see. Depending on the application and export settings, a PNG file may also store the prompt, generation parameters, model information or even a complete node workflow.

That information is not visible when you simply open the image. It is stored in metadata chunks inside the PNG file. If the metadata is still present, you may be able to discover how the image was generated without guessing from its appearance.

This guide explains how to inspect an AI-generated PNG from Stable Diffusion, AUTOMATIC1111 or ComfyUI, and what to do when no prompt is found.

Can a PNG image really contain an AI prompt?

Yes. The PNG format supports several text-related chunks, including tEXt, zTXt and iTXt. Applications can use these chunks to store text alongside the image data.

Some AI image-generation tools use this capability to save generation information. Depending on the application, the metadata may include:

However, not every PNG contains this information. Metadata may never have been written, may have been disabled by the creator, or may have been removed by an editor, optimizer or social platform.

Method 1: Check a Stable Diffusion image with AUTOMATIC1111

If the PNG was generated with AUTOMATIC1111, the easiest method is to use its built-in PNG Info tab.

  1. Open your AUTOMATIC1111 web interface.
  2. Select the PNG Info tab.
  3. Drag the original PNG file into the image area, or choose it from your computer.
  4. Wait for the metadata to be read.
  5. Review the generation parameters displayed by the interface.

When the file contains compatible metadata, the interface can show the prompt and settings used for generation. Depending on what was saved, you may see the sampler, steps, CFG scale, seed, dimensions and model-related information.

You can usually send the recovered parameters to another Stable Diffusion tab to reuse them as a starting point. Keep in mind that the result may still differ if the original model, VAE, extensions or other settings are unavailable.

If PNG Info displays no generation data, that does not prove the image was not AI-generated. It only means the expected information was not found in a format that the interface could read.

Method 2: Recover a ComfyUI workflow from a PNG

ComfyUI can save workflow information in generated PNG files. This can be especially useful because the metadata may contain more than a text prompt: it can include the node graph used to create the image.

Try this method with the original PNG:

  1. Open ComfyUI in your browser or desktop application.
  2. Locate the PNG image on your computer.
  3. Drag the image directly onto the ComfyUI canvas.
  4. If the metadata is compatible and present, ComfyUI loads the saved workflow or prompt graph.
  5. Inspect the nodes, connections, prompt text and generation settings.

You can also use the application's file-opening workflow where supported. The exact interface may vary between ComfyUI versions and distributions.

What can a ComfyUI PNG workflow reveal?

A saved workflow may show the sequence of nodes used to generate the image, including text encoders, samplers, model loaders, latent-image steps and output nodes. It can help you understand how the generation was configured and make a similar workflow of your own.

A workflow is not the same as a complete portable project. It may refer to checkpoint files, LoRAs, custom nodes, input images or other resources that are not embedded in the PNG. If those dependencies are missing from your installation, the graph may load with errors or may not reproduce the original result.

What if ComfyUI does not load anything?

First, confirm that you are using the original PNG rather than a screenshot or a re-exported copy. Then try another PNG known to have been generated by ComfyUI. If one file loads and the other does not, the second file may have lost its metadata or may have been created with metadata saving disabled.

Method 3: Inspect PNG metadata without the original AI application

You do not always need AUTOMATIC1111 or ComfyUI to check whether a PNG contains text metadata. A PNG inspection utility or metadata viewer that exposes PNG chunks can help you examine the file directly.

Look for text chunks such as:

The names and contents of the stored fields depend on the software that created the image. For example, an application may use fields such as parameters, prompt, workflow or other application-specific keys.

When inspecting a file, work on a copy if you plan to edit or remove metadata. Do not assume that every text chunk contains a prompt: some may contain ordinary comments, descriptions or unrelated information.

Why can't I find a prompt in my PNG?

There are several common explanations:

The application did not save metadata. Some tools export only the rendered pixels, or provide a setting to disable prompt metadata.

The image was edited or re-exported. Image editors and optimization tools may rewrite the PNG and discard text chunks they do not recognize or preserve.

The file was converted or shared online. A conversion pipeline or platform may strip metadata as part of processing. This behavior varies, so check the exact downloaded file rather than assuming all services behave the same way.

The image is not the original file. A screenshot, copied preview or compressed download may not retain the original metadata.

The metadata uses an unsupported format. A viewer may not recognize application-specific fields even though the PNG contains other text chunks.

Can you find an AI prompt inside a JPG image?

JPEG files can also contain metadata, but the storage mechanisms are different from PNG text chunks. Some AI applications may save generation details in JPEG metadata or other application-specific segments, while others save prompt information only in PNG exports.

If you have a JPG, use a metadata viewer that supports JPEG metadata and inspect the available fields. Do not expect the same tEXt, zTXt or iTXt chunks used by PNG files.

Can you recreate the exact image from a recovered prompt?

Not necessarily. A prompt is only one part of an image-generation setup. To reproduce a result closely, you may also need the same model checkpoint, seed, sampler, scheduler, number of steps, guidance scale, dimensions, VAE, LoRAs, ControlNet inputs and software versions.

Even when all the visible settings are available, differences in model files, extensions or execution environments can change the output. Treat recovered metadata as a useful record of the generation process, not a guarantee of an identical result.

Is hidden AI metadata a privacy risk?

It can be. Before sharing an AI-generated image publicly, consider whether its metadata reveals information you would rather keep private. Depending on the application, a file may disclose prompts, internal workflow structure, model names, local file references or details about source images.

This matters particularly when you create images for clients, publish work under a brand, or share files that contain private reference material. Inspect the original file and the final exported copy before distribution. If you need to remove metadata, use a tool that clearly identifies what it will remove and verify the output afterward.

Final thoughts

A PNG image can contain a useful record of how it was generated, but only when the creating application saved that information and the metadata has not been stripped. Start with PNG Info for AUTOMATIC1111, drag the file onto the ComfyUI canvas for a workflow, or inspect the PNG text chunks with a metadata viewer.

If no prompt appears, the information may never have been stored or may have been removed. The visible image alone cannot reliably reveal the exact prompt or workflow that created it.

Further reading

Frequently asked questions

Do all AI-generated PNG images contain the original prompt?

No. The prompt is present only when the image-generation application saved it in the PNG metadata and the metadata has not since been removed.

Can I find a ComfyUI workflow inside a PNG?

Often, yes. ComfyUI can save prompt and workflow information in PNG metadata. Drag the image onto the ComfyUI canvas to check whether the workflow can be restored.

Does converting PNG to JPG remove the prompt?

Many conversion and optimization workflows discard ancillary PNG text chunks, but this depends on the software and its settings. Always inspect the resulting file rather than assuming metadata was removed.

Can I recover the exact AI model from the PNG?

Sometimes the metadata records a checkpoint or model name, but the file does not necessarily contain the model itself. A matching model file, custom nodes, input images or other dependencies may still be missing.

Is hidden prompt metadata a privacy risk?

It can be. Metadata may reveal prompts, workflow details, model names, seed values or other information you did not intend to share. Inspect files before publishing them.

AdvertisementAd space — reserved, no network calls until AdSense is enabled