ComfyUI Node: remove

Class Name

Basic data handling: SetRemove

Category
Basic/SET
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

SetRemove node removes a specified item from a set, returning the updated set and success status.

remove:

The SetRemove node is designed to facilitate the removal of a specific item from a set, a fundamental data structure in programming that stores unique elements. This node is particularly useful when you need to ensure that a particular item is no longer part of a set. It operates by taking a set and an item as inputs and attempts to remove the specified item from the set. If the item is successfully removed, the node returns the updated set along with a success indicator. If the item is not found in the set, the original set is returned, and the success indicator is set to false. This functionality is crucial for managing collections of unique items, allowing you to dynamically update sets based on specific conditions or requirements.

remove Input Parameters:

set

The set parameter represents the collection of unique items from which you want to remove a specific item. This parameter is crucial as it defines the initial state of the set before any removal operation is performed. The set can contain any type of elements, and there are no restrictions on its size. The operation will attempt to remove the specified item from this set.

item

The item parameter is the specific element you wish to remove from the set. This parameter can be of any data type, matching the types of elements contained within the set. The presence of this item in the set determines the outcome of the operation. If the item is found, it will be removed, and the success indicator will be true. If the item is not present, the set remains unchanged, and the success indicator will be false.

remove Output Parameters:

set

The set output parameter provides the resulting set after the removal operation. If the specified item was successfully removed, this set will reflect that change. If the item was not found, the output set will be identical to the input set. This output is essential for verifying the state of the set post-operation.

success

The success output parameter is a boolean indicator that signifies whether the removal operation was successful. A value of true indicates that the item was found and removed from the set, while a value of false indicates that the item was not present in the set, and thus no removal occurred. This parameter is useful for conditional logic based on the success of the operation.

remove Usage Tips:

  • Use the SetRemove node when you need to ensure that a specific item is not present in a set, especially in scenarios where the presence of duplicates is not allowed.
  • Combine this node with other set operations like SetAdd or SetUnion to dynamically manage and update collections of unique items based on changing conditions.

remove Common Errors and Solutions:

KeyError

  • Explanation: This error occurs when the specified item is not found in the set, and the operation attempts to remove it.
  • Solution: Ensure that the item you are trying to remove is indeed present in the set. You can use the SetContains node to check for the presence of an item before attempting removal.

TypeError

  • Explanation: This error might occur if the input parameters are not of the expected types, such as passing a non-set object as the set parameter.
  • Solution: Verify that the set parameter is indeed a set and that the item parameter is of a compatible type with the elements in the set.

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