Light-Tool: Load Metadata From URL
Read a ComfyUI PNG's embedded workflow straight off the web
- metadata
"Workflow included" is the coin of the realm in the ComfyUI community - images carry their generation settings baked into PNG metadata, and that's how workflows travel. Light-Tool: LoadMetadataFromURL grabs an image from a URL and hands you whatever metadata is embedded in it as a JSON string. Find an image you like online, paste its URL, and get the recipe out without downloading anything by hand.
One input: image_url. One output: metadata, a STRING containing the JSON-serialized metadata dictionary.
How it works. It downloads the image to your ComfyUI input directory, opens it with Pillow, and dumps the image's .info dictionary - which for a ComfyUI-generated PNG includes the prompt and workflow text chunks that hold the entire graph. The result is JSON, which means you can wire it straight into the pack's KeyValue node to pull out individual fields, or eyeball the whole thing.
Where it shines. The obvious move is reconstructing a workflow from a posted image - the embedded prompt blob is essentially the workflow in JSON form. It's also genuinely handy for inspecting what settings someone actually used, or for pulling metadata from your own remote-hosted outputs. If you pair it with KeyValue, you can extract a specific parameter (say, the seed or the checkpoint name) into the graph and even feed it back into a loader.
The quirks worth knowing. The filename it saves under is derived from the URL's last path segment with .png appended - so a URL ending in photo.jpg becomes a file literally named photo.jpg.png. Harmless, but if two URLs share a basename, they collide on disk and the second overwrites the first. There's also a subtle catch in the error handling: the try/except only catches JSONDecodeError, so a failed download can raise a less friendly exception than you'd hope. If the node errors, check that the URL is reachable and actually points at a PNG.
The honest limitations. This reads metadata from a URL; it doesn't fetch the image into your graph for further processing - for that you'd use LoadImageFromURL. And metadata is only as complete as the image's source: images stripped of metadata (many image hosts re-encode and drop PNG text chunks) will return an empty or sparse dict. If you get an empty result, the metadata was probably removed in transit, not a node bug.
Installing. With the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool.git
pip install -r requirements.txt
# restart ComfyUI
Or ComfyUI Manager → search ComfyUI-Light-Tool → Install. No models; it's Pillow and httpx under the hood, both already in the pack's requirements.
It's a small node with a specific job, but for anyone who reverse-engineers workflows from shared images, it removes the download-and-drag ritual entirely.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image_url | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| metadata | STRING | — |