ComfyUI Node: update

Class Name

Basic data handling: DictUpdate

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

update Description

DictUpdate merges two dictionaries, prioritizing values from the second for overlapping keys.

update:

The DictUpdate node is designed to efficiently merge two dictionaries, allowing you to combine key-value pairs from both sources into a single, cohesive dictionary. This node is particularly useful when you need to update an existing dictionary with new data or when you want to consolidate information from multiple sources. The primary advantage of using DictUpdate is its ability to handle overlapping keys gracefully; if both dictionaries contain the same key, the value from the second dictionary will overwrite the value from the first. This ensures that the most recent or relevant data is retained in the final output. By leveraging this node, you can streamline data management tasks, reduce redundancy, and maintain up-to-date information in your projects.

update Input Parameters:

dict1

dict1 is the first dictionary input parameter for the DictUpdate node. It serves as the base dictionary that will be updated with key-value pairs from the second dictionary. This parameter is crucial as it provides the initial set of data that will be modified or expanded upon. There are no specific minimum or maximum values for this parameter, as it can contain any number of key-value pairs. The default value is an empty dictionary, meaning if no data is provided, the node will simply return the contents of dict2.

dict2

dict2 is the second dictionary input parameter for the DictUpdate node. It contains the key-value pairs that will be used to update or add to dict1. If dict2 has keys that are also present in dict1, the values from dict2 will replace those in dict1. This parameter is essential for introducing new data or updating existing entries in the base dictionary. Like dict1, there are no restrictions on the number of key-value pairs it can contain, and the default value is an empty dictionary. If dict2 is empty, dict1 remains unchanged.

update Output Parameters:

DICT

The output parameter of the DictUpdate node is a single dictionary, denoted as DICT. This output represents the merged result of dict1 and dict2, containing all key-value pairs from both inputs. If there are overlapping keys, the values from dict2 will be present in the output, ensuring that the most recent data is reflected. This output is crucial for applications where data consolidation and updates are necessary, providing a streamlined and updated dictionary for further processing or analysis.

update Usage Tips:

  • Use DictUpdate when you need to merge data from two sources, ensuring that the most recent or relevant information is retained.
  • To avoid unintended data overwrites, ensure that dict2 only contains keys that you intend to update in dict1.

update Common Errors and Solutions:

TypeError: 'NoneType' object is not subscriptable

  • Explanation: This error occurs when one of the input dictionaries is None instead of a valid dictionary.
  • Solution: Ensure that both dict1 and dict2 are initialized as dictionaries before passing them to the node.

KeyError: 'key'

  • Explanation: This error might occur if you attempt to access a key that does not exist in the resulting dictionary.
  • Solution: Verify that the keys you are trying to access exist in the merged dictionary, or use the get method to safely retrieve values with a default.

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

update