Get Workflow Data
A node that reads your other nodes' brains
- node
- workflow_json
- field_value_str
- field_value_int
- field_value_float
- node_data
ComfyUI already knows everything about your workflow - it just hides it. Every node you place is stored as JSON in the graph, and when you save a PNG, that whole graph is embedded in the file's metadata. Get Workflow Data is the pry-bar that pulls any single value out of that hidden data and hands it to you as a wire: the seed on a KSampler, the CFG, the text sitting inside a CLIP Text Encode, the steps. It's the node you reach for when you think "I wish I could just read what's in that node."
It comes from Hangover3832's ComfyUI_Hangover-Utils pack, the successor to the older ComfyUI-Hangover-Nodes suite. Fair warning up front: the pack is a hobbyist "learning work in progress," tested on Windows 10 only. Get Workflow Data is genuinely useful, but it's a plumber's tool with plumber's sharp edges - read this before you assume it's broken.
How it works
This is the clever bit, and it's why the input is typed as * (any). When you connect a node to its node input, the node doesn't look at whatever value flows across that wire. Instead it looks up the connected node's ID in ComfyUI's internal prompt JSON - the exact same data that gets embedded in a saved image - and digs a path out of it. The field_name input takes dot-formatted keys like inputs.seed or inputs.cfg, and it walks that path recursively.
Because it reads the saved prompt representation rather than runtime tensors, there's a hard limit you'll hit fast: if the field you're after arrives at the node via a wire instead of a typed widget, it isn't in that JSON, and you get nothing (the console prints a warning to that effect). Widget values you type in - seed, steps, CFG, prompt text - are all fair game.
The inputs and outputs that matter
Only two inputs really matter:
- field_name - the dotted path into the node, e.g.
inputs.seed. Leave it empty and you get the whole node dumped as JSON. - value_prefix / value_suffix - text glued around the extracted value, so you can build strings like
seed: 123on the fly.
The five outputs:
- workflow_json - the embedded workflow from the PNG's metadata (see the metadata essay in the KB for why that chunk is worth having programmatically).
- field_value_str - the value with prefix/suffix applied. This is the one you'll wire into text or filename nodes.
- field_value_int and field_value_float - numeric versions of the value; they're
0/0.0if the field isn't a number. - node_data - the entire JSON of the connected node as a string, handy for finding the exact dotted path you need.
Install
ComfyUI Manager: search ComfyUI_Hangover-Utils (or just "Hangover"), install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/Hangover3832/ComfyUI_Hangover-Utils
then restart ComfyUI. This node itself pulls in no heavy deps - the pack's requirements.txt (numpy, sympy, pillow, pyperclip) covers it. No model downloads for this node, unlike the pack's Make Inpaint Model node.
Where people get burned
- KeyError kills the run. If
field_namedoesn't exist in the parent node, the node raisesError: field name <...> not found in the parent nodeand the whole queue stops. The save is in the console: the node prints the parent node's JSON on every run, so copy the exact path from that printout before wiring it up. - Wired inputs read as empty. Connected inputs aren't in the prompt JSON, so targeting one silently returns nothing. Convert the widget to an input and the value stops being readable here.
- No node connected → the node returns the workflow JSON plus empty values instead of erroring, which is easy to mistake for a data source.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| value_prefix | STRING | — | |
| field_name | STRING | — | |
| value_suffix | STRING | — | |
| nodeopt | * | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| workflow_json | STRING | — |
| field_value_str | STRING | — |
| field_value_int | INT | — |
| field_value_float | FLOAT | — |
| node_data | STRING | — |