Widget to String
Read any node's value without rewiring your whole graph
- any_input
- string
Every ComfyUI node has widgets - the little boxes for seeds, CFG, steps, text. Normally those values are trapped inside the node; to use one elsewhere you have to right-click, convert the widget to input, and wire up a primitive. Widget to String is the lazy way out: it reaches into another node and pulls a widget's current value out as plain text, no rewiring required.
What it's for
The classic use is metadata and filenames. You want to stamp the seed, steps, and model name into an output filename or a Save Image caption, but those values live as widgets on your KSampler and loaders. Rather than converting three widgets to inputs and dragging primitives around, you drop one Widget to String per value, tell it which node and which widget, and wire the string straight into your filename template. It also pairs beautifully with Show Text [Eclipse] for eyeballing a node's settings mid-debug.
How it works
The mechanism is simple: you give it a node ID (that's the number ComfyUI shows on the node's title bar - hover or look in the top-left corner of the node) and the widget name (the label shown on the widget, like seed or cfg). At execution it grabs that widget's current value and serializes it to a string. There's a fallback too: instead of an ID you can pass a node title to match by name, which is far more stable if your node IDs shift when you edit the graph. Handy if you have a half-dozen workflows where "that one node" keeps getting a different number.
The return_all toggle is the power move - flip it and the node dumps every widget value from the target node as one formatted string, which is great for a "settings recap" block you can save with outputs. There's also allowed_float_decimals to control how many decimal places floats get, so your 8.666666 CFG doesn't turn into a cursed filename.
Inputs and outputs
The inputs that matter: id (node ID to read from), widget_name (which widget), return_all (grab everything instead), and the optional node_title (match by title instead of ID). The single output, string, is the value as text - feed it into filename builders, Show Text, or any string joiner.
One catch to know: widget values are the displayed values, so if a widget has been converted to an input, there's no stored widget value to read and this node can't help. For anything that's genuinely a connected value, you want the primitive-conversion route instead.
Install it
It ships in ComfyUI_Eclipse. ComfyUI Manager β search "Eclipse" β Install, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Restart, and it's under Eclipse β Conversion. Standard pack deps apply - opencv-python, pilgram, PyYAML, aiohttp on top of ComfyUI's base stack; portable installs may need pip install -r custom_nodes/ComfyUI_Eclipse/requirements.txt.
Gotchas
The ID trap is the big one: node IDs in ComfyUI are not guaranteed stable across edits, and copying a workflow to another machine can renumber everything. Prefer node_title once your graph is settled, or expect to re-point the ID when you clone a workflow. Also, this reads displayed values - if you're mid-run and the seed widget just randomized, you get whatever's in the box now, not the seed that actually produced the last image. Read it before you queue, or you'll be chasing a moving target.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| id | INT | 00β100000 | Node ID to extract widget value from. |
| widget_name | STRING | Name of the widget to extract. | |
| return_all | BOOLEAN | false | Return all widget values as a formatted string. |
| any_inputopt | * | β | |
| node_titleopt | STRING | Node title to match instead of ID. | |
| allowed_float_decimalsopt | INT | 20β10 | Number of decimal places to display for float values. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | β |