DEV Community

Cover image for How to Extract Prompts from ComfyUI Images: Free PNG Parser & the .deut Standard

How to Extract Prompts from ComfyUI Images: Free PNG Parser & the .deut Standard

If you work with generative AI (like Stable Diffusion) in production, you regularly need to extract a prompt from an image or view generation settings. The basic workflow is well known: drop a generated PNG into the ComfyUI or Automatic1111 interface to reveal the node network.

The technical backbone — weights, seeds, and text queries — is physically embedded in hidden tEXt chunks within the binary file as a massive JSON. While convenient for solo work in the moment, using PNGs as a long-term database for architectural studios or design agencies is a highly fragile pattern.

This guide explains how our team solved the PNG metadata extraction problem, why we built a free local PNG-parser, and why the visual AI industry needs the open .deut standard.

The Trap of ComfyUI Missing Nodes (And Why You Need an Extractor)

The power of the ComfyUI ecosystem lies in custom nodes from the open-source community. The downside of this flexibility is fragile dependencies. Over a year or two, packages update, authors abandon repositories, and backward compatibility breaks.

If you load an old PNG into a fresh environment, you will likely hit the ComfyUI Missing Nodes error (an interface littered with red blocks).

Crucial clarification: Our tool does not magically fix broken node graphs. If a custom node is dead, your visual pipeline won't run. However, the text data itself is not lost — it safely resides inside the file. The actual pain point is accessing that data easily.

To recall the exact words and weights used for a specific lighting setup, you normally have to:

  1. Waste hours downgrading Python packages to resurrect the old environment.
  2. Open the binary in a text editor to manually dig through a giant, unreadable JSON dump.

This is a poor engineering experience. We built a tool to bypass this bottleneck entirely.

How Metadata is Stored in a PNG (Technical Context)

To understand extraction, here is a simplified look at the raw byte structure of a generated image. Data is stored in specific text chunks that standard image viewers ignore:

IHDR... (Standard Image Header)
tEXtprompt... {"1": {"inputs": {"ckpt_name": "model.safetensors"}, "class_type": ...
Enter fullscreen mode Exit fullscreen mode

You need a dedicated metadata viewer to read this string.

Step One: Free Local PNG Metadata Extractor (Client-side)

We solved the immediate utilitarian need: how to quickly read metadata from a file without launching a server environment or writing custom Python scripts?

On the deut.li website, we launched a free PNG parser.

deut.li interface

Zero-server architecture: We strictly do not store anything and use no backend. The parser runs entirely locally in your browser (Client-side). Files are never uploaded to our servers, consuming zero external traffic. The script scans the binary, locates the tEXtprompt marker, cleanly extracts the raw JSON, and converts it into readable text.

deut.li interface

You instantly get your data back, while the images never leave your local machine. The extracted data is saved in the same directory, sharing the image's name but utilizing the .deut extension. Inside, it contains structured data in a human-readable format.

deut.li .deut files alongside with PNGs

Note: As the first step in our product's evolution, a prompt creation assistant is already active in a separate section of our site, allowing you to construct text queries from scratch.

Step Two: The .deut Format as a Storage Standard

Extracting raw data is excellent, but storing a corporate prompt database as raw JSON blobs is a bad idea. We didn't need the magic of automatically recognizing other people's graphs; we needed a predictable container.

deut.li .deut file sample

We formalized the .deut format. Extracted (or assistant-written) data is saved in this transparent text format.

The output is a lightweight file weighing just a couple of kilobytes. Let's compare the reliability of storing your intellectual property in a standard PNG versus the .deut format:

Feature Standard PNG (ComfyUI / A1111) The .deut Format
Data Preservation Vulnerable. Metadata is permanently deleted if the image is edited, optimized, or sent as a media file in messengers (Telegram, WhatsApp). Stable. It is a pure text file that remains intact during transfers and is immune to image compression algorithms.
Ease of Access Low. Requires launching specific generative AI software, specialized nodes, or using a hex editor to read. High. Opens instantly in any standard text editor or IDE on any device, without requiring Python.
Machine-readability & Indexing Poor. Data is hidden inside a binary blob, making corporate database searches (e.g., Notion, Jira) impossible. Native. Plain text is instantly indexable, searchable by tags, and natively understood by LLMs and search engines.

Evolution: A professional prompt editor

Extraction and basic storage are just the beginning. Right now, we are developing a full-fledged visual prompt editor where professionals will be able to work with .deut files manually, building a professional pipeline.

The tool is being built for designers and architects who need predictability, versioning (the ability to track the history of manual prompt changes — almost like Git for visual artists), templates, and cryptographic verification — a mathematical proof of the prompt's immutability. This is a critical requirement for studios protecting their intellectual property and proving authorship over specific visual generations.

Open Architecture

We build deut.li with an uncompromising approach to data architecture. The .deut format is completely open.

We invite engineers and developers to explore the specification in our Git repository. You can freely parse our containers, use this structure, and build your own local solutions or scripts on its foundation for seamless integration into your corporate pipelines.

Link to open specification on GitHub


Frequently Asked Questions (FAQ)

Q: Can I extract prompts from PNGs without ComfyUI installed?
A: Yes. Our client-side parser reads tEXt chunks directly in your browser without requiring Python, ComfyUI, or Automatic1111 installations.

Q: Does your tool fix broken node workflows?
A: No. We extract the metadata and text prompts so you can read and reuse them. We do not repair broken dependencies or missing custom nodes in your local ComfyUI environment.

Q: Is the parser safe for confidential studio images?
A: Absolutely. The tool runs 100% locally in your browser. No images or text data are ever uploaded to any external server.

Q: What happens if I send a ComfyUI PNG via WhatsApp or Telegram?
A: If sent as a standard photo (not as a document/file), the messenger's compression algorithm will strip the hidden metadata, permanently deleting your prompt and workflow. Storing recipes as .deut text files prevents this data loss.

Top comments (0)