Nodes/SDVN_Comfy_node/ℹ️ Metadata check
ComfyUI Node

ℹ️ Metadata check

Pull one specific field out of an image's embedded metadata

By StableDiffusionVN·Created 2 years ago·Updated 29 days ago· 118
ℹ️ Metadata check
    • info
    metadata
    info_type

    Every ComfyUI image can carry its entire workflow inside the PNG file itself - drag one back into ComfyUI and the whole graph rebuilds. That's the culture: "workflow included" is a norm, not a courtesy. Metadata Check is the node that reads that embedded data back out and pulls the one piece you actually want, instead of dumping the whole raw blob at you.

    How it works

    It takes a raw metadata string - typically piped in from the pack's Image Info node after it reads a PNG's embedded chunks - and an info_type selector telling it what to extract. That's the entire job: parse the blob, hand back one slice of it. It doesn't read the file itself; something upstream (Image Info, or an Exif Check node) has to load the image and surface its raw metadata first.

    The six extraction modes split into two families. ComfyUI_Workflow_Json and ComfyUI_Node_List are for ComfyUI-native metadata - the former gives you the full embedded workflow JSON, the latter a list of which node classes the workflow actually used (handy for spotting which custom node packs you'd need installed to run someone else's shared image). The Automatic_* modes - Info, Positive, Negative, Setting - are for the older Automatic1111-style metadata format, the plain-text convention of prompt / Negative prompt: … / Steps: …, Sampler: … that a huge amount of the community's shared images still carry, especially anything that started life outside ComfyUI.

    The inputs and outputs that matter

    • metadata - the raw metadata string to parse. Comes from an upstream metadata-reading node, not typed by hand.
    • info_type - pick what to extract: ComfyUI_Workflow_Json, ComfyUI_Node_List, Automatic_Info, Automatic_Positive, Automatic_Negative, or Automatic_Setting.

    One output, info - the extracted string. Feed Automatic_Positive into a text encoder to reconstruct a prompt from an A1111-style image, or ComfyUI_Node_List into a Save Text node to keep a dependency manifest alongside your workflow.

    Installing it

    ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
    

    Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart.

    Where people get burned

    Picking the wrong metadata family for the image's origin. If the image was made in ComfyUI, the Automatic_* modes have nothing to extract - that plain-text format simply isn't there. If it came from A1111 or a fork of it, the ComfyUI_Workflow_Json mode returns empty for the same reason in reverse. Know which pipeline made the image before picking the mode.

    Feeding it an image, not metadata. This node parses a string, it doesn't decode a PNG. If you wire an IMAGE output straight into metadata, it won't work - you need an Image Info or Exif Check node in between to actually pull the embedded text out first.

    Downloaded or re-saved images often have nothing embedded. Screenshots, images run through a re-encoder, or anything that stripped metadata on the way (some social platforms do this automatically) will hand this node an empty string, and every info_type comes back empty. That's not a bug in the node - the data genuinely isn't in the file anymore.

    Category📂 SDVN/ℹ️ Info_check

    Inputs (2)

    NameTypeDefaultDescription
    metadataSTRINGChuỗi metadata.
    info_typeCOMBO6 options: ComfyUI_Workflow_Json, ComfyUI_Node_List, Automatic_Info, Automatic_Positive, Automatic_Negative, Automatic_Setting

    Outputs (1)

    NameTypeDescription
    infoSTRINGThông tin trích xuất.