Load metadata from image
Pulling generation parameters back out of an image file
- file_names
- ui_widget
- metadata
You've got an image with a workflow or generation settings baked into it, and you want those settings back as usable data instead of squinting at a PNG-info viewer. LF_LoadMetadata is built for exactly that - it's the reverse of the pack's own LF_SaveImageForCivitAI: where that node embeds metadata into a file when you save, this one reads it back out.
The interaction is different from most nodes in this pack. Instead of a typed widget, file_names is an upload field (KUL_UPLOAD) - you pick one or more image files directly through it, with multiple files identified by semicolon-separated names (e.g. file1.jpg;file2.png;file3.jpg). Whatever embedded metadata those files carry comes back as a single metadata output, typed as JSON - structured, not a flat string, so you can pull specific fields out of it downstream with something like LF_ExtractString rather than regex-hunting through raw text.
That JSON typing is the actual reason to reach for this over just opening the file in an EXIF/PNG-info viewer yourself: once the metadata is a structured value inside your graph, you can chain it into anything else in this pack that speaks JSON - pull one specific field out with LF_ExtractString, re-save a filtered subset with LF_SaveJSON, or feed it into whatever logic you're building around "reproduce this exact generation." It turns a one-off inspection task into something you can automate.
Installing it. ComfyUI Manager: search "LF Nodes," install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/lucafoscili/lf-nodes, then restart ComfyUI. Get it from that repo specifically - comfy.icu's listing points at comfyui-lf, the pack's original home, which the author archived after finishing the migration to lf-nodes; same node, current address. No model downloads, no heavy dependencies - this is filesystem and metadata parsing, nothing GPU-related.
Where people get tripped up. The one thing that actually matters: this only works on images that have metadata embedded in the first place. A screenshot, a re-compressed copy, or an image downloaded from somewhere that stripped metadata on the way (a lot of hosting platforms and messaging apps do this automatically) will give you nothing to extract, regardless of what the original generation settings were. Images saved straight out of ComfyUI, or through this pack's own LF_SaveImageForCivitAI with embed_workflow left on, are the reliable case. Second, format matters - PNG is the most dependable carrier for embedded metadata in this ecosystem; if you're pulling from a JPEG or WebP, verify the metadata actually survived whatever pipeline produced that file before assuming this node will find something. And since the output is JSON rather than a flat string, if downstream nodes are complaining about type mismatches, check you're feeding a JSON-aware node (LF_ExtractString, LF_SaveJSON) rather than something expecting plain text.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| file_names | KUL_UPLOAD | List of file names separated by semicolons (e.g., file1.jpg;file2.png;file3.jpg). | |
| ui_widgetopt | KUL_CODE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| metadata | JSON | — |