Nodes/ComfyUI-EulerDiscreteScheduler/Load Image ErosDiffusion
ComfyUI Node

Load Image ErosDiffusion

Pull the prompt back out of a PNG

By erosDiffusion·Created 8 months ago·Updated 8 months ago· 414
Load Image ErosDiffusion
    • image
    • positive_prompt
    • width
    • height
    • filename
    image

    Every image ComfyUI saves has your whole workflow stapled inside the PNG. The prompt, the dimensions, the seed - it's all sitting in the file's metadata, invisible until something reads it. This node reads it. You point it at a previously-generated PNG and it hands you back the image and the positive prompt, width, height, and filename as separate outputs you can wire into the rest of a graph.

    It's a load-image node with a memory, basically - which is why the author labels it Load Image ErosDiffusion in the menu even though the class name is ImageMetadataExtractor. The everyday use is recovering work you'd otherwise have to retype. You've got a generation you liked from last week, you want to branch off it or regenerate at the same size, but the prompt's gone from your clipboard. Drop the PNG in, and the prompt text comes straight back out into a CLIP Text Encode without you copy-pasting a thing. It also slots neatly into this pack's whole reason for existing: load an old image, extract its prompt, re-run it through the sharper Z-Image scheduler.

    How it works

    ComfyUI (and A1111, and most local tools) writes generation parameters into a PNG's text chunks - small blocks of plain text embedded alongside the pixels that survive as long as nobody re-encodes the file. This node opens the picked image, decodes those chunks, and parses out the fields it knows about. The image tensor comes through untouched; the metadata gets split into typed outputs. Nothing here calls a model or the network - it's pure file parsing, so it's instant.

    The inputs and outputs that matter

    There's exactly one input:

    • image - a dropdown of the files in your ComfyUI input folder, same picker as the stock Load Image node. Pick the PNG you want to mine.

    The outputs are where the value is:

    • image (IMAGE) - the loaded picture itself, ready to feed a preview, a VAE encode for img2img, or a resize.
    • positive_prompt (STRING) - the recovered prompt text. Send it into a CLIP Text Encode and you've reconstructed the conditioning.
    • width / height (INT) - the original dimensions, ready to drive an Empty Latent Image or a resize so your regen matches.
    • filename (STRING) - the source file's name, handy for consistent output naming or just keeping track of what you branched from.

    The typical wiring: positive_prompt to your text encode, width and height to your latent, image wherever you need the actual pixels. It turns "I want to redo this but tweak one thing" into a two-wire operation.

    Installing it

    It rides along with the rest of the pack. In ComfyUI Manager, search erosDiffusion, install, and restart. Or from a terminal: cd ComfyUI/custom_nodes && git clone https://github.com/erosDiffusion/ComfyUI-EulerDiscreteScheduler.git, then restart. No separate models or downloads - it's a utility node.

    Where people get burned

    • No metadata, no output. This node can only read what's actually in the file. If your PNG has been stripped - uploaded to Discord or most social sites, re-saved by an image editor, screenshotted, or converted to JPEG - the text chunks are gone and the prompt/size outputs come back empty. Metadata survives a straight copy; it rarely survives a round trip through anything else.
    • The prompt has to have been written in a format it recognizes. Different tools embed generation info differently - ComfyUI stores the full workflow as JSON, A1111 writes a flat parameters string. A node like this parses the shapes it was built for, so a prompt from an unusual pipeline may not extract cleanly even when the file does carry metadata. If the image output looks right but positive_prompt is blank, that mismatch is the usual reason, not a broken install.
    • It reads the positive prompt specifically. There are no outputs here for negative prompt, seed, sampler, or steps - just the four fields listed above. If you need the full parameter set recovered, this isn't the node for it.
    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (5)

    NameTypeDescription
    imageIMAGE
    positive_promptSTRING
    widthINT
    heightINT
    filenameSTRING