Nodes/ComfyUI_Hangover-Utils/Get Workflow Data
ComfyUI Node

Get Workflow Data

A node that reads your other nodes' brains

By Hangover3832·Created about a year ago·Updated 2 days ago· 1
Get Workflow Data
  • node
  • workflow_json
  • field_value_str
  • field_value_int
  • field_value_float
  • node_data
value_prefix
field_name
value_suffix

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: 123 on 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.0 if 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_name doesn't exist in the parent node, the node raises Error: field name <...> not found in the parent node and 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.
CategoryHangover

Inputs (4)

NameTypeDefaultDescription
value_prefixSTRING
field_nameSTRING
value_suffixSTRING
nodeopt*

Outputs (5)

NameTypeDescription
workflow_jsonSTRING
field_value_strSTRING
field_value_intINT
field_value_floatFLOAT
node_dataSTRING