ComfyUI Node: set

Class Name

Basic data handling: DictSet

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

set Description

DictSet node enables efficient setting or updating of dictionary key-value pairs for dynamic data management.

set:

The "Basic data handling: DictSet" node is designed to facilitate the manipulation of dictionary data structures by allowing you to set or update the value associated with a specific key. This node is particularly useful when you need to modify existing dictionaries or add new key-value pairs efficiently. By leveraging the set method, this node ensures that you can dynamically manage dictionary contents, which is essential for tasks that require frequent updates or modifications to data. The primary goal of this node is to provide a straightforward and effective way to handle dictionary data, making it an invaluable tool for AI artists who need to manage complex data structures without delving into intricate programming details.

set Input Parameters:

dictionary

This parameter represents the dictionary you wish to modify. It serves as the base structure where the new key-value pair will be set. The dictionary should be a valid Python dictionary object. There are no specific minimum or maximum values for this parameter, but it must be a dictionary type.

key

The key parameter specifies the key in the dictionary where the value will be set. It can be any hashable type, such as a string, integer, or tuple. The key is crucial as it determines the location within the dictionary where the value will be stored or updated. There are no predefined options, but it must be a valid key type.

value

This parameter defines the value to be associated with the specified key in the dictionary. The value can be of any data type, including strings, numbers, lists, or even other dictionaries. The flexibility of this parameter allows you to store a wide range of data types within your dictionary.

set Output Parameters:

updated_dictionary

The output parameter is the updated dictionary that includes the newly set or updated key-value pair. This output is crucial as it reflects the changes made to the original dictionary, allowing you to use the modified data structure in subsequent operations or nodes. The updated dictionary maintains the same structure as the input dictionary but with the specified modifications.

set Usage Tips:

  • Ensure that the key you are setting is unique within the dictionary to avoid unintentional overwriting of existing data.
  • Use this node in conjunction with other dictionary manipulation nodes to build complex data handling workflows.
  • Consider the data type of the value you are setting to ensure compatibility with other nodes or operations that may use the updated dictionary.

set Common Errors and Solutions:

KeyError

  • Explanation: This error occurs if you attempt to set a value for a key that is not present in the dictionary when using certain dictionary methods.
  • Solution: Ensure that the key exists in the dictionary if you are using methods that require existing keys, or use the DictSet node to add new keys safely.

TypeError

  • Explanation: This error can occur if the key provided is not a hashable type, which is required for dictionary keys.
  • Solution: Verify that the key is a valid hashable type, such as a string, integer, or tuple, before attempting to set it in the dictionary.

set 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.

set