Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI_hus_utils > Fetch widget value

ComfyUI Node: Fetch widget value

Class Name

Fetch widget value

Category
utils/hus
Author
hustille (Account age: 1314days)
Extension
ComfyUI_hus_utils
Latest Updated
2024-05-22
Github Stars
0.01K

How to Install ComfyUI_hus_utils

Install this extension via the ComfyUI Manager by searching for ComfyUI_hus_utils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_hus_utils in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Fetch widget value Description

Fetches a widget value from a matching workflow node, or combines values from multiple nodes.

Fetch widget value:

Fetch widget value retrieves a setting from another node in the current workflow so you can reuse it elsewhere without manually copying it. It looks through the saved workflow for a matching node, then reads the requested value from that node’s current prompt data. You can retrieve the first match or combine values from several matching nodes, which is useful when you want different parts of a workflow to refer to the same settings.

Fetch widget value Input Parameters:

node_name

The name of the node whose value you want to fetch. Enter the exact text used by the target node’s “Node name for S&R” property, if present; otherwise, the node can be matched by its type or title. The node searches the workflow in order, so if several nodes match and you choose to fetch only one value, the first match with the requested widget is returned. This is a single-line string with no default, minimum, or maximum specified.

widget_name

The exact name of the setting to retrieve from the matching node’s prompt inputs. This must match an input name in the target node’s prompt data; a label that looks similar in the interface may not be sufficient. If a matching node does not have that input, the node raises a “Widget not found” error rather than skipping it. This is a single-line string with no default, minimum, or maximum specified.

multiple

Choose whether to fetch one value or collect values from every matching node. Options are no (default), which returns the first matching value, and yes, which gathers matching values in workflow order and joins them with a comma and space. When using yes, each matched node must contain the requested input. This parameter has no numeric minimum or maximum.

Fetch widget value Output Parameters:

string

The retrieved value, exposed through the node’s single STRING output. With multiple set to no, this is the value from the first matching node. With multiple set to yes, it is the collected values joined into one comma-separated string, with leading and trailing commas or spaces removed. You can connect this output where you want to reuse the fetched setting; if no suitable value is found, the node raises an error instead of producing an output.

Fetch widget value Usage Tips:

  • For a single shared setting, leave multiple at its default, no. This stops the search as soon as the first matching value is found.
  • Use an exact, distinctive node_name when several nodes share a type. You can match a node’s “Node name for S&R” property or its title, depending on how that node is identified in the workflow.
  • Check the target node’s prompt input name before entering widget_name. If you select yes for multiple, check every node that matches node_name, because a missing input on any of them causes an error.
  • Choose multiple = yes when you want a comma-separated list of values from matching nodes, rather than a value from just the first match.

Fetch widget value Common Errors and Solutions:

Widget not found: <node_name>.<widget_name>

  • Explanation: A node matched node_name, but its prompt inputs did not contain the exact widget_name you entered.
  • Solution: Check the target node’s input name and spelling. If multiple is yes, make sure every matching node has that input, or use a more specific node_name.

Node not found: <node_name>.<widget_name>

  • Explanation: The search finished without collecting a value. No workflow node may have matched node_name, or a matched node may not have had prompt inputs available to read.
  • Solution: Check the node’s type, title, or “Node name for S&R” property for an exact match. Also confirm that the target node and its setting are present in the current workflow and prompt.

KeyError: 'workflow'

  • Explanation: The workflow metadata expected by this node is missing, so it cannot search the workflow’s nodes.
  • Solution: Run the node in a workflow execution that supplies workflow metadata. If you are using a custom execution method, ensure it includes that metadata.

KeyError: 'nodes'

  • Explanation: Workflow metadata is present, but it does not contain the node list the search requires.
  • Solution: Check that the workflow data being supplied is complete and includes its nodes before running the node.

KeyError: '<node_id>'

  • Explanation: A matching node appears in the workflow, but its ID is missing from the current prompt data, so there is no prompt entry for this node to inspect.
  • Solution: Confirm the target node is included in the current prompt execution, then retry with a target that has prompt data available.

TypeError while combining multiple values

  • Explanation: With multiple set to yes, the node joins the collected values as text. Joining fails if one of those values is not a string.
  • Solution: Use no to fetch a single value, or choose a widget_name whose values are strings on all matching nodes.

Fetch widget value Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_hus_utils
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.