Load Image + Prompt (Civitai/A1111/ComfyUI)
Every old image still hides its prompt — this loader digs it out
- image
- mask
- positive
- negative
- raw_metadata
Look at a PNG you generated six months ago and the image is all you see. But the file itself is still carrying the prompt, the negative, even the whole workflow - embedded as plain text in metadata your image viewer simply never shows you. ComfyUI's own LoadImage can't get at it: the moment a file is decoded into an IMAGE tensor, all that metadata is stripped. That's the gap this node fills. It's called Load Image + Prompt (Civitai/A1111/ComfyUI) and it opens the file itself, so you get the image and the prompt it was made with, in one shot.
Reach for it whenever you want to regenerate or riff on something old. Seed an img2img pass from a previous result, recover the exact positive/negative when someone posts a great image without a workflow, or feed the recovered prompt straight into a CLIP Text Encode or an LLM prompt node. It's a drop-in replacement for LoadImage - same image dropdown, same upload button, and it even outputs mask, so you can swap it into an existing graph without rewiring anything.
How it works
The prompt is recovered by parsing embedded metadata, trying the most explicit source first:
- Civitai
extraMetadata- a JSON blob with explicitprompt/negativePromptfields, at the workflow root or underextra. - A1111 / Civitai block - the PNG
parameterschunk, or EXIFUserComment(UTF-16, the format A1111 writes). - ComfyUI API graph - the PNG
promptchunk or JSON in EXIF. - ComfyUI UI graph - the
workflowchunk, best-effort.
The ComfyUI cases are where the author earned their keep. Instead of grabbing "the first CLIPTextEncode" - which would frequently hand you the negative prompt - the node follows the sampler's positive link and walks through passthroughs (ControlNet, ConditioningCombine, primitives) to find the actual positive.
Inputs that matter
Three widgets, honestly:
image- the dropdown (with upload). Pick the file you want.strip_lora_tags(on by default) - removes network tags like<lora:Train_Entrance_SDXL-000027:1>,<lyco:…>,<hypernet:…>from both outputs, and cleans up the orphaned commas so1girl, <lora:x:1>, solobecomes1girl, solo. Turn it off to get the prompt verbatim.on_failure- whatpositivereturns when no prompt is found: an empty string, or a short diagnostic message that tells you which source it tried. Keep this on "empty string" for pipelines, flip it to "error message" when you're debugging why a file came up blank.
There's also image_path, an optional absolute path that overrides the dropdown - handy for reading files outside ComfyUI's input folder.
Outputs
image, mask, positive, negative, and raw_metadata (the raw metadata text, if you want to inspect what was actually in the file).
Install
Part of the comfyui-llm-prompt-studio pack - install the pack and you get this node plus three siblings. ComfyUI Manager: search comfyui-llm-prompt-studio. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/grandju51/comfyui-llm-prompt-studio
Restart ComfyUI, refresh the browser. No pip install, no model downloads - the pack only uses the Python standard library, and PIL/torch already ship with ComfyUI.
Common issues
The author tested 4,654 local images and recovered prompts from 4,635 of them (99.6%). The remainder genuinely contain none - screenshots, and LoadImage → RemBg → SaveImage-style workflows with no sampler in them. So if you get an empty positive, the file probably never had a prompt, not the node failing. The on_failure diagnostic will tell you.
One nice touch: the node re-reads the file when it changes on disk (mtime + size), so it plays nice with ComfyUI's caching instead of re-parsing on every run. And it tolerates workflows saved by older versions of the node with shifted widget values - it degrades to defaults rather than aborting the whole prompt with "Value not in list." The kind of robustness that only shows up after the author got bitten once.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Image to load. Its embedded metadata is parsed to recover the prompt it was generated with. | |
| image_path | STRING | Optional absolute path, overrides the dropdown. Use it to read an image outside ComfyUI's input folder. | |
| strip_lora_tags | BOOLEAN | true | Remove LoRA/LyCORIS/hypernet tags from the outputs, e.g. <lora:Train_Entrance_SDXL:1>. The commas they leave behind are cleaned up too. Turn off to keep the prompt verbatim. |
| on_failure | COMBO | empty string | What 'positive' returns when no prompt is found: an empty string, or a short diagnostic message. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| positive | STRING | — |
| negative | STRING | — |
| raw_metadata | STRING | — |