Nodes/Comfyui_PDuse/PD Load Image (LoRA/JSON/Workflow)
ComfyUI Node

PD Load Image (LoRA/JSON/Workflow)

Load an image and get the prompt, model, and LoRAs that made it

By 7BEII·Created 2 years ago·Updated 15 days ago· 53
PD Load Image (LoRA/JSON/Workflow)
    • 图片
    • 遮罩
    • 提示词
    • 模型信息
    • LoRA信息
    image

    Every PNG that comes out of ComfyUI has the whole recipe embedded in it - the prompt, the checkpoint, the LoRAs, the seed - as text chunks in the file (the KB's image-I/O doc calls the workflow "the project file," and it's right). PD_LoadImageMetadata ("PD Load Image (LoRA/JSON/Workflow)") is a loader that reads that recipe for you. You pick an image, and it outputs the pixels, the alpha mask, and three strings: the prompt, the model info, and the LoRA info extracted from the embedded metadata. It's the "what did I use to make this?" node, which is a genuinely useful thing to have when you're trying to recreate a look from a file you or someone else generated months ago.

    It's one of several image loaders in the 7BEII/Comfyui_PDuse pack, and the most metadata-aware of them.

    How it works

    Load the image, open it with PIL, and read its PNG info. ComfyUI writes a prompt text chunk holding the full execution graph as JSON, and this node parses that JSON, walks every node, and sorts them into three buckets:

    • 提示词 (prompt) - the text from your CLIP Text Encode nodes, pulled back out.
    • 模型信息 (model info) - the checkpoint name from your loader node.
    • LoRA信息 (LoRA info) - which LoRA files were applied and at what strength.

    So you get the answer to "what made this" without dragging the file onto the canvas and poking at the reconstructed graph. Combine it with a Show Text node and you've got an instant "ingredients list."

    The inputs and outputs - mind the Chinese names

    • image - a dropdown of images in your input/ folder, with an upload button. Same as core Load Image.

    The outputs are IMAGE, MASK, then three STRINGs - and here's the gotcha: the output names are in Chinese (提示词 = prompt, 模型信息 = model info, LoRA信息 = LoRA info). You'll see the Chinese labels on the sockets. If you wire by position rather than name you'll be fine; if you rely on the labels, learn the three characters or just remember "third socket = prompt, fourth = model, fifth = LoRA."

    Installing

    ComfyUI Manager, search Comfyui_PDuse; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/7BEII/Comfyui_PDuse
    cd Comfyui_PDuse
    pip install -r requirements.txt
    

    Restart. No model downloads.

    Gotchas

    Metadata extraction only works if the metadata is still in the file. Anything re-encoded - Reddit reposts, JPEG conversions, screenshots, most Discord inline previews - has stripped the chunks, and you'll get empty strings back. The KB's metadata doc is blunt about this: if the text was deleted by re-encoding, no loader can recover it. Also note this node reads the ComfyUI prompt chunk; an A1111-style image with a flat parameters string won't parse into model/LoRA buckets the same way. And the model/LoRA detection keys off the standard ComfyUI node class names - a workflow that used an unusual loader node may come back with those fields blank even though the prompt itself parses fine. Still, for the common case - "I found a great PNG, what did it use?" - this is the fastest answer in the pack.

    CategoryPD:load image

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (5)

    NameTypeDescription
    图片IMAGE
    遮罩MASK
    提示词STRING
    模型信息STRING
    LoRA信息STRING