Nodes/comfy_Pond_Nodes/🐳加载图像(清除元数据)
ComfyUI Node

🐳加载图像(清除元数据)

Load an image and leave its embedded workflow behind

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳加载图像(清除元数据)
    • 图像
    • 元数据信息
    图像
    清除元数据true

    Every PNG that came out of ComfyUI is carrying the entire workflow that produced it - the node graph, the values, the seed - embedded as text chunks. That's normally a feature: drag it back onto the canvas and the whole pipeline reconstructs. But there are moments when you explicitly don't want that. You're restyling someone else's image and don't want their workflow leaking into your session. You're building a pipeline that re-saves images and you want clean files. Or you just want to see what's inside a file without tripping the workflow loader. 🐳加载图像(清除元数据) (Load Image Without Metadata) is that tool: pixels in, metadata stays behind, and what was in the file gets handed to you as a readable string.

    How it works

    It loads the image with Pillow, dumps the file's embedded metadata (img.info, which is where those workflow chunks live) into a JSON string, then returns the image as a plain tensor. Because a tensor only carries pixel values, no metadata travels down the wire with it - the embedded workflow is simply never part of what you pass onward. That's the whole mechanism: not active scrubbing, just not carrying it.

    Inputs and outputs

    • 图像 (image) - a file picker over ComfyUI's input folder, with upload support.
    • 清除元数据 (clear metadata) - a boolean, default true. Flip it off and you'll still get the metadata string output; the point of the node is the clean pixel path regardless.

    Outputs:

    • 图像 (IMAGE) - the loaded pixels as a tensor, metadata-free by construction.
    • 元数据信息 (metadata info, STRING) - the file's embedded metadata as readable JSON. This is the sneaky-useful output: it lets you inspect what a stranger's PNG actually contains before you decide whether to drag it in as a workflow.

    The practical loop: load a downloaded image with this node, read 元数据信息 to see whether it carries a workflow and which prompt/model it used, and restyle the pixels without importing anything you didn't ask for.

    The honest caveats

    The metadata string comes from the PNG's text chunks; if the file was already re-encoded (hosts like Reddit and Discord strip these), 元数据信息 will be empty - that's expected, not a bug. And "clean" here means the output tensor is clean; if you then wire that image into a Save Image node, your new workflow gets embedded into the output file, which is normal ComfyUI behavior.

    Install

    Standard for the pack:

    ComfyUI Manager → search "Pond Nodes" (comfy_Pond_Nodes)
    

    or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Pondowner857/comfy_Pond_Nodes
    cd comfy_Pond_Nodes
    pip install -r requirements.txt
    

    Restart after. Pillow and numpy cover it; no models to download. And the pack's usual footnote - the README documents a console-spam conflict with comfyui_HiDream-Sampler if you run both.

    Category🐳Pond/元数据

    Inputs (2)

    NameTypeDefaultDescription
    图像COMBO3 options: brekkie.jpg, example.png, plantpot.png
    清除元数据BOOLEANtrue

    Outputs (2)

    NameTypeDescription
    图像IMAGE
    元数据信息STRING