ComfyUI Node: remove

Class Name

Basic data handling: DictRemove

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

remove Description

DictRemove node removes a specified key-value pair from a dictionary, returning a cleaned version.

remove:

The DictRemove node is designed to streamline the process of managing dictionaries by allowing you to remove a specific key-value pair. This node is particularly useful when you need to clean up or modify a dictionary by eliminating unwanted entries. By providing a dictionary and a key, the node efficiently returns a new dictionary with the specified key removed. If the key is not present in the dictionary, the original dictionary is returned unchanged. This functionality is essential for maintaining organized and relevant data structures, ensuring that your dictionary only contains the necessary information.

remove Input Parameters:

input_dict

The input_dict parameter is the dictionary from which you want to remove a key-value pair. It serves as the primary data structure that the node will operate on. This parameter is crucial because it determines the context in which the key removal will occur. There are no specific minimum or maximum values for this parameter, as it can be any dictionary. The default value is an empty dictionary {}.

key

The key parameter specifies the key of the key-value pair you wish to remove from the dictionary. This parameter is vital because it identifies the exact entry to be removed. If the key is not found in the dictionary, the operation will not alter the dictionary, and it will be returned as is. The default value for this parameter is an empty string "", indicating that no key is specified by default.

remove Output Parameters:

dict

The dict output parameter is the resulting dictionary after the specified key has been removed. If the key was present and successfully removed, this dictionary will reflect that change. If the key was not found, the original dictionary is returned unchanged. This output is essential for verifying the success of the operation and for further processing or analysis.

key_removed

The key_removed output parameter is a boolean value that indicates whether the specified key was successfully removed from the dictionary. A value of True signifies that the key was found and removed, while False indicates that the key was not present in the dictionary. This output is important for understanding the outcome of the operation and for making decisions based on whether the removal was successful.

remove Usage Tips:

  • Ensure that the key parameter is correctly specified to avoid unnecessary operations or unchanged results.
  • Use the key_removed output to verify the success of the operation and to handle cases where the key might not exist in the dictionary.

remove Common Errors and Solutions:

KeyError

  • Explanation: This error occurs if the specified key is not found in the dictionary and the node attempts to remove it.
  • Solution: Ensure that the key you are trying to remove exists in the dictionary. You can use the DictContainsKey node to check for the key's existence before attempting removal.

TypeError

  • Explanation: This error might occur if the input_dict is not a valid dictionary type.
  • Solution: Verify that the input_dict parameter is indeed a dictionary. Ensure that the data structure passed to the node is compatible with dictionary operations.

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

remove