ComfyUI Node: remove

Class Name

Basic data handling: ListRemove

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

ListRemove node removes the first occurrence of a specified value from a list, returning a modified list and success status.

remove:

The ListRemove node is designed to simplify the process of removing elements from a list by targeting the first occurrence of a specified value. This node is particularly useful when you need to clean up or modify lists by eliminating unwanted elements. It operates by taking a list and a value as inputs, then attempts to remove the first instance of that value from the list. If the value is found and removed, the node returns the modified list along with a success indicator. If the value is not present in the list, the original list is returned unchanged, and the success indicator is set to false. This functionality is essential for managing data lists efficiently, ensuring that you can easily update and maintain your data structures without manually iterating through the list.

remove Input Parameters:

list

The list parameter is the primary input for the ListRemove node, representing the collection of elements from which you want to remove a specific value. This parameter accepts any list of items, allowing for flexibility in the types of data you can manage. The list can contain elements of any data type, including numbers, strings, or custom objects. The node will attempt to remove the first occurrence of the specified value from this list. There are no minimum or maximum constraints on the size of the list, and it can be empty, although no removal will occur in such cases.

value

The value parameter specifies the element you wish to remove from the list. This parameter can be of any data type, matching the types of elements within the list. The node searches for the first occurrence of this value in the list and removes it if found. If the value is not present, the list remains unchanged. There are no default values for this parameter, as it must be explicitly provided to perform the removal operation.

remove Output Parameters:

list

The list output parameter provides the resulting list after attempting to remove the specified value. If the value was successfully removed, this output will reflect the updated list with the first occurrence of the value eliminated. If the value was not found, the output will be identical to the input list. This output is crucial for verifying the success of the removal operation and for further processing or analysis of the modified list.

success

The success output parameter is a boolean indicator that signifies whether the removal operation was successful. It returns True if the specified value was found and removed from the list, and False if the value was not present. This parameter is important for conditional logic, allowing you to determine the next steps based on whether the removal was successful.

remove Usage Tips:

  • Use the ListRemove node when you need to clean up lists by removing specific unwanted elements, ensuring your data remains relevant and accurate.
  • Combine ListRemove with other list manipulation nodes to create complex data processing workflows, enhancing your ability to manage and transform data efficiently.

remove Common Errors and Solutions:

ValueError: list.remove(x): x not in list

  • Explanation: This error occurs when the specified value is not found in the list, and the node attempts to remove it.
  • Solution: Ensure that the value you are trying to remove actually exists in the list. You can use the ListContains node to check for the presence of the value before attempting removal.

TypeError: 'NoneType' object is not iterable

  • Explanation: This error might occur if the list input is not properly initialized or is set to None.
  • Solution: Verify that the list input is correctly defined and is a valid list object before passing it to the ListRemove node.

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