Load image info from file
Pull the prompt back out of an image you didn't make in ComfyUI
- positive_prompt
- negative_prompt
- metadata
The workflow lives in the file - that's the whole philosophy of this ecosystem. ComfyUI writes its node graph into PNG chunks, A1111/Forge writes a flat parameters string, and NovelAI writes a JSON comment. The catch is that most loaders hand you pixels and drop the prompt. Load Image Info from File is the node that reaches back into the file and pulls out positive_prompt, negative_prompt, and metadata as plain strings you can feed straight back into a workflow.
How it works
It opens the image you pick and inspects its metadata in priority order, matching each dialect:
- NovelAI images (detected via the
Softwaretag): reads theCommentJSON and extracts the positive fromv4_prompt.caption.base_caption(or the olderpromptkey), the negative fromv4_negative_prompt/negative_prompt/uc. The prompt fields are then removed from the remaining comment, which is handed back as the metadata JSON. - EXIF
UserComment(the A1111/Forge dialect on JPEG/WebP): splits on the literal"Negative prompt:"marker, then parses the trailingKey: valuesettings into a metadata dictionary. - GIF
commentand the PNGparameterstext chunk: same A1111-style parsing.
In every A1111-style path it also strips <lora:...> tags from the prompts - sensible, since those reference AUTOMATIC1111's lora folder and path format, which mean nothing inside ComfyUI. Whatever dialect it finds, the result is the same contract: three strings out.
Inputs and outputs
Just one input: image_file, a dropdown of the images in ComfyUI's input/ folder (you can also upload straight into it). Outputs are positive_prompt, negative_prompt, and metadata - all STRING. Wire the positive straight into a CLIP Text Encode and you can reconstruct a generation from someone else's A1111 or NovelAI output without retyping a word.
What it won't do
It will not extract a ComfyUI workflow graph. If you drop in a plain ComfyUI-saved PNG that only carries the workflow/prompt chunks and no A1111-style parameters block, you'll get empty strings out - the node reads generation parameters, not node graphs. (Drag that file onto the canvas instead if you want the graph back; that's core ComfyUI.) It's also read-only: it never writes anything, so there's no risk of stripping the metadata it just read. One more quirk: the metadata parser is regex-based and tuned for the common Key: value layout, so exotic setting strings can land in odd buckets - check the metadata output with a display node before trusting it blindly.
Install
ComfyUI Manager → search "comfy-nekonote-extensions", or:
cd ComfyUI/custom_nodes
git clone https://github.com/0nyx-networks/comfy-nekonote-extensions
Restart ComfyUI; it's under NEKONOTE → Load. Part of the MIT-licensed comfy-nekonote-extensions pack by MINETA "m10i" Hiroki (v0.4.7). The one dependency worth noting is piexif, used to parse EXIF UserComment - if reading JPEG/WebP metadata fails, make sure it's installed (Manager handles it). No model files, and the pack targets the newer comfy_api.latest backend API, so keep ComfyUI reasonably current.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image_file | COMBO | 1 options: example.png |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| metadata | STRING | — |