ComfyUI Node: get

Class Name

Basic data handling: DictGet

Category
Basic/DICT
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling 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

get Description

DictGet retrieves a dictionary value by key, offering a default if the key is absent.

get:

The DictGet node is designed to retrieve a value from a dictionary using a specified key. This node is particularly useful when you need to access specific data within a dictionary structure, which is a common data handling task in programming and data manipulation. The primary advantage of using this node is its ability to provide a default value if the specified key is not found in the dictionary, thereby preventing errors that might occur from attempting to access a non-existent key. This feature ensures that your workflow remains robust and error-free, even when dealing with incomplete or dynamic datasets. By leveraging this node, you can efficiently manage and extract data from dictionaries, making it an essential tool for AI artists who work with structured data.

get Input Parameters:

input_dict

The input_dict parameter is the dictionary from which you want to retrieve a value. It serves as the primary data source for the node's operation. This parameter is crucial because it contains the key-value pairs that the node will search through to find the specified key. There are no specific minimum or maximum values for this parameter, as it can be any dictionary structure.

key

The key parameter specifies the key whose corresponding value you wish to retrieve from the dictionary. It is a string input, and its value determines which entry in the dictionary will be accessed. If the key is not found in the dictionary, the node will return the default value if provided, or None if not. The default value for this parameter is an empty string, indicating that no key is specified by default.

default

The default parameter is optional and allows you to specify a value to return if the specified key is not found in the dictionary. This parameter is highly beneficial as it provides a fallback mechanism, ensuring that the node returns a meaningful result even when the key is absent. The default value for this parameter is None, but it can be set to any value that suits your needs.

get Output Parameters:

value

The value output parameter represents the value retrieved from the dictionary using the specified key. If the key is found, this parameter will contain the corresponding value from the dictionary. If the key is not found and a default value is provided, it will contain the default value. Otherwise, it will be None. This output is crucial for further processing or decision-making in your workflow, as it provides the specific data you need from the dictionary.

get Usage Tips:

  • Always provide a default value to ensure that your workflow remains robust and does not break when a key is not found in the dictionary.
  • Use descriptive and unique keys in your dictionaries to avoid conflicts and ensure that the DictGet node retrieves the correct value.
  • Consider using this node in conjunction with other dictionary manipulation nodes to build complex data processing pipelines.

get Common Errors and Solutions:

KeyError

  • Explanation: This error occurs when the specified key is not found in the dictionary and no default value is provided.
  • Solution: Always provide a default value to handle cases where the key might not exist in the dictionary.

TypeError: 'NoneType' object is not subscriptable

  • Explanation: This error can occur if the input_dict parameter is not a valid dictionary or is None.
  • Solution: Ensure that the input_dict parameter is a valid dictionary before passing it to the node.

get Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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.

get