Load Image ποΈ
Load an image and recover the prompt that made it
- IMAGE
- MASK
- possible prompt
- image name
A drop-in replacement for the stock ComfyUI Load Image node that does one extra, genuinely useful thing: it tries to figure out and return the prompt that made the image you just loaded. If you've got a folder of old generations and no memory of what prompted any of them, this is the node that gets you closer to an answer without opening the file in an external metadata viewer.
How it works
ComfyUI embeds the full workflow graph as metadata inside every PNG it saves - that's the mechanism that lets you drag an old output back into ComfyUI and have the whole pipeline reconstruct. This node leans on exactly that: it reads the embedded workflow out of the image and searches it for a specific, named list of nodes that are known to hold prompt text - CLIPTextEncodeSDXL, CLIPTextEncode, easy positive, easy showAnything, ShowText|pysssss, Eff. Loader SDXL, SDXLPromptStyler, and this pack's own Prompt Styler and Prompt Styler Extra. If your prompt lived in one of those, it comes back as the possible prompt output. If it didn't - because it lived in some other custom text node not on that list, or the image has no embedded workflow at all - you get nothing, and that's a limit of the search list, not a bug.
The README's own suggested fix is worth repeating because it's the actual solution: drop a ShowText|pysssss node anywhere in your workflow (it doesn't even need to be doing anything load-bearing) and this node will reliably find your prompt through it going forward.
The inputs and outputs that matter
image- the standard ComfyUI upload widget: pick a file already in your input folder, or upload one.
Outputs: IMAGE and MASK (the same pair a normal Load Image gives you), plus possible prompt (STRING - the recovered prompt text, when found) and image name (STRING - the filename).
Installing it
Via ComfyUI Manager: search "iTools" or "ComfyUI-iTools," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MohammadAboulEla/ComfyUI-iTools
then restart.
Troubleshooting
possible prompt comes back empty. The most common cause is that the image simply has no embedded ComfyUI workflow - a screenshot, a re-saved/re-compressed copy, or an image from outside ComfyUI entirely won't have anything to search. If it was made in ComfyUI, the next most likely cause is that the prompt lived in a node not on the supported list - check whether your usual workflow uses something like a raw string primitive or a third-party text node this search doesn't know about.
You want this to work reliably going forward. Add a ShowText|pysssss node into your generation workflows now, even just as a pass-through you don't otherwise use - per the README, it's specifically there as insurance so future images loaded through this node will have their prompt recoverable, regardless of what else changes in your graph.
Recovered prompt looks truncated or slightly wrong. The node is pulling text out of a specific node's saved value inside the embedded graph, not re-deriving the prompt from scratch - if that source node's text was itself edited after the image was generated (unlikely, since the metadata is a snapshot) or if multiple candidate nodes existed and the wrong one got picked, double-check the image's embedded workflow directly (drag it into ComfyUI) to see the ground truth.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| MASK | MASK | β |
| possible prompt | STRING | β |
| image name | STRING | β |