Prompt Extractor (Inspire)
Pull the prompt back out of a PNG's metadata
- positive
- negative
You've got a generated PNG and you want the prompt that made it - to remix it, reproduce it, or just see what someone did. If the image still has its metadata, Prompt Extractor reads it out. ComfyUI and A1111 both embed generation info into the PNG, and this node parses that blob and hands you back the positive and negative prompts as usable strings.
The catch, and it's the whole reason this node needs a little setup: metadata formats vary. A1111 stashes everything in one text field; ComfyUI embeds a whole JSON workflow. So the node can't always guess which piece is "positive" and which is "negative" - you tell it, by pointing at the right keys after you've seen what's in there.
How it works
It loads an image, reads its embedded generation metadata into a text field, and then extracts the positive and negative prompts based on identifiers you provide. As the README puts it, since it retrieves all the text, you have to specify which parts to use for positive and negative. In practice: run it once to see the metadata dumped into the info field, find the labels or keys that mark the positive and negative sections, and enter those so the node knows what to pull.
The inputs and outputs that matter
image- the image to read metadata from (pick from your input images).info(multiline) - the metadata dump. This is where the raw embedded text surfaces so you can inspect it and figure out the identifiers.positive_idandnegative_id- the identifiers that mark the positive and negative sections within that metadata. This is the manual step: you set these to match whatever the source tool embedded.
Two outputs: positive and negative, the extracted prompt strings. Wire them into CLIP Text Encode to regenerate, or into a text display to just read them.
Installing it
Part of the Inspire Pack by Dr.Lt.Data, author of ComfyUI Manager and the Impact Pack - mainstream, well-maintained tooling. Via ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
then restart. No downloads or extra dependencies.
Common issues
Nothing comes out. The most common reason is that the image has no metadata to read. Stripped it happens constantly: uploading to most social platforms, screenshotting, re-saving through an editor, or converting to JPG all wipe the embedded info. If the PNG went through any of those, the prompt is simply gone - no tool can recover it.
It dumps text but positive/negative are empty or wrong. That's positive_id/negative_id not matching the source format. Look at the raw info field first, identify how that tool labeled its sections, and set the identifiers to match. A1111 metadata and ComfyUI metadata are structured completely differently, so an identifier that works for one won't work for the other.
The metadata is a giant JSON workflow, not a readable prompt. That's a ComfyUI-generated PNG - it embeds the whole node graph. The prompt text is in there, but you'll need to point the identifiers at the right node's text field. It's fiddlier than reading an A1111 image, but the data is present.
Nodes won't load after install. Check the terminal log - usually a version mismatch. Update Inspire Pack and Impact Pack together and restart.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| positive_id | STRING | — | |
| negative_id | STRING | — | |
| info | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |