Nodes/Comfyui_PDuse/PD:Load Image + Metadata
ComfyUI Node

PD:Load Image + Metadata

Load an image and dump its entire workflow as readable text

By 7BEII·Created 2 years ago·Updated 15 days ago· 53
PD:Load Image + Metadata
    • image
    • formatted_list
    • raw_workflow
    image

    You know how dragging a ComfyUI PNG back onto the canvas rebuilds the whole graph? PD_LoadImageWithMeta ("PD:Load Image + Metadata") is the text version of that: it loads an image, extracts the embedded workflow JSON, and renders it as a human-readable inventory - node by node, showing the ID, the node type, every parameter value, and what each input links to. Same trick as dragging it in, but you get a document you can read, log, or paste into a report instead of a graph you have to poke around.

    It's one of three metadata-aware loaders in the 7BEII/Comfyui_PDuse pack. The difference between them is worth spelling out: PD_LoadImageMetadata summarizes (prompt/model/LoRA), while this one dumps everything.

    How it works

    Load the image, read the embedded prompt chunk, parse it as JSON, and format it. The output formatted_list looks like this, roughly:

    █ [ID: 1]
       Type: CheckpointLoaderSimple
       • ckpt_name: sd_xl_base_1.0.safetensors
       ► Link (model): -> Node [4]
    

    Every node gets its ID and class type; plain widget values get listed with a bullet; values that are actually wires (the [node_id, slot] format) get rendered as a readable "links to Node X" line. Long parameter values are truncated at 100 characters so a giant prompt doesn't lock up your text box. It's ordered by node ID, which is the execution order, so you can trace a pipeline from checkpoint to VAE top to bottom.

    The second output, raw_workflow, is the original embedded workflow JSON as a string - the unformatted, machine-grade version. Pair it with a save-text node and you've archived a workflow as text, which is handy for versioning or diffing two images' recipes against each other.

    The inputs and outputs

    • image - dropdown of input/ images, with upload. Same as every loader in this pack.
    • image (IMAGE) - the pixels, so it works as a plain loader too.
    • formatted_list (STRING) - the readable inventory above.
    • raw_workflow (STRING) - the raw embedded JSON.

    There's no mask output here - if you need alpha, this is the wrong loader; it's for metadata forensics.

    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 models.

    Gotchas

    Same metadata reality as every reader: it only works if the chunks are still in the file. Re-encoded copies (Reddit, JPEG, screenshots, most Discord inline previews) have had the workflow stripped - the KB's metadata doc is categorical about this - so a great image from a repost will come back with empty strings, and no amount of parsing recovers deleted text. Also, this reads the ComfyUI prompt chunk specifically; an image generated as an API job or through an A1111-style tool won't have the same structure. The one real annoyance: the output is long - a 50-node workflow produces a wall of text, so don't wire formatted_list into a tight preview widget. For the use case of "decode what made this, and keep a copy," it's the pack's best tool.

    CategoryCustomTools/ImageLoader

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    formatted_listSTRING
    raw_workflowSTRING