Nodes/comfyui-get-meta/Get Workflow from Image
ComfyUI Node

Get Workflow from Image

Pull the full workflow JSON out of any ComfyUI image

By shinich39·Created about a year ago·Updated 5 months ago· 9
Get Workflow from Image
  • image
  • STRING
workflow

Dragging an image into ComfyUI reconstructs the workflow that made it, but it hands it to you as a graph - which is great when you want to run it and awkward when you want the raw JSON. Get Workflow from Image does the opposite: it dumps the entire embedded workflow file into a text widget, pretty-printed, ready to inspect, diff, or save.

It's one of eight nodes in shinich39's comfyui-get-meta pack, and the "whole thing" version of the pack's trick. Where the query-based nodes extract one value, this one grabs the complete workflow JSON - the visual graph ComfyUI stores with every PNG: node positions, links, titles, widget defaults, and your Note text.

How it works

Same pack plumbing. The browser extension finds the image loader feeding the image input, has the backend open the file with Pillow, and reads the embedded metadata. For this node it takes the workflow field (JSON5-parsed), re-serializes it pretty-printed, and stuffs it into the multiline workflow widget. The Python class is a passthrough that returns the widget text; IS_CHANGED is hardcoded so it re-runs and refreshes each queue.

One distinction worth knowing: workflow vs. prompt. The workflow is the UI graph - it knows how nodes are arranged on the canvas and what's visually connected. The prompt (handled by the pack's other dump node) is the executed API graph with the actual values that ran. If a workflow was edited after generation, the workflow JSON can look different from what really executed; the workflow node gives you the file as saved, not the run history.

The inputs and output that matter

  • image - wire from a supported loader: core LoadImage/LoadImageMask, Inspire Pack's "LoadImage //Inspire", Crystools' "Load image with metadata [Crystools]", or WAS Node Suite's "Image Load".
  • workflow - the multiline widget that fills with the full JSON. Not for reading in the node - it's a big blob.

The single STRING output carries the JSON. Pipe it to a save-text node to archive it, feed it to a tool, or compare two images' workflows by dumping both and diffing.

Installing it

ComfyUI Manager → search comfyui-get-meta → Install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/shinich39/comfyui-get-meta

Restart after cloning. No models, no extra dependencies - Pillow is already a ComfyUI requirement and JSON5 ships bundled with the pack.

Common issues

  • The widget shows {} - no embedded workflow metadata. Stripped saves, re-uploads, screenshots. The image itself may be perfectly good; the file just doesn't carry the graph.
  • The JSON is enormous - that's normal for a real workflow with dozens of nodes, each carrying position data. Don't try to eyeball it in the widget; that's what the STRING output is for.
  • Unsupported loader - the extension only traces the supported loaders; wire from anything else and nothing fills.

Honest take: if your use case is "I want the workflow file that's inside this image," you could also just drag the image into ComfyUI and export from there. This node earns its keep when you're automating - grabbing and saving a workflow programmatically, or comparing two images' graphs - rather than for casual inspection. It's the pack's rawest output, which is exactly its point.

Categoryimage

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
workflowSTRING

Outputs (1)

NameTypeDescription
STRINGSTRING