ComfyUI > Nodes > ComfyUI-Nudenet > Filtered Labels

ComfyUI Node: Filtered Labels

Class Name

FilterdLabel

Category
Nudenet
Author
phuvinh010701 (Account age: 2022days)
Extension
ComfyUI-Nudenet
Latest Updated
2025-05-01
Github Stars
0.02K

How to Install ComfyUI-Nudenet

Install this extension via the ComfyUI Manager by searching for ComfyUI-Nudenet
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Nudenet 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

Filtered Labels Description

Dynamic label filtering based on predefined mapping for selective inclusion/exclusion, enhancing data processing efficiency.

Filtered Labels:

The FilterdLabel node is designed to dynamically filter labels based on a predefined mapping, allowing you to selectively include or exclude certain labels from processing. This node is particularly useful in scenarios where you need to manage and control the flow of data by filtering out unwanted labels, thus streamlining the processing pipeline. By leveraging a boolean input for each label, it provides a flexible mechanism to customize which labels are considered in the output, enhancing the efficiency and relevance of the data being processed. The primary function of this node is to generate a list of class IDs that are not filtered out, which can then be used in subsequent processing steps.

Filtered Labels Input Parameters:

<label_name_1>

Each label name corresponds to a key in the LABELS_CLASSIDS_MAPPING dictionary and is associated with a boolean input. This input determines whether the label should be filtered out or included in the output. If set to True, the label is filtered out; if False, the label is included in the whitelist of class IDs. The default value for each label is True, meaning that by default, all labels are filtered out unless explicitly set to False.

<label_name_2>

Similar to <label_name_1>, this parameter represents another label from the LABELS_CLASSIDS_MAPPING dictionary. The boolean input for this label functions in the same way, allowing you to control its inclusion in the output. The default setting is True, and changing it to False will include the label in the whitelist.

...

Filtered Labels Output Parameters:

FILTERED_LABELS

The output parameter FILTERED_LABELS is a tuple containing a list of class IDs that have not been filtered out. This list is generated based on the boolean inputs provided for each label, and it represents the labels that are allowed to pass through the filter. This output is crucial for subsequent processing steps that require a specific set of labels to be included, ensuring that only relevant data is processed further.

Filtered Labels Usage Tips:

  • To effectively use the FilterdLabel node, start by identifying the labels you want to include in your processing pipeline and set their corresponding boolean inputs to False. This will ensure they are not filtered out.
  • Regularly update the LABELS_CLASSIDS_MAPPING dictionary to reflect any changes in your label set, ensuring that the node remains accurate and effective in filtering the desired labels.

...

Filtered Labels Common Errors and Solutions:

KeyError: '<label_name>'

  • Explanation: This error occurs when a label name provided as input does not exist in the LABELS_CLASSIDS_MAPPING dictionary.
  • Solution: Verify that all label names used as inputs are correctly spelled and exist in the LABELS_CLASSIDS_MAPPING dictionary. Update the dictionary if necessary to include any new labels.

TypeError: 'NoneType' object is not iterable

  • Explanation: This error may occur if the LABELS_CLASSIDS_MAPPING dictionary is not properly initialized or is empty.
  • Solution: Ensure that the LABELS_CLASSIDS_MAPPING dictionary is correctly defined and populated with the necessary label-to-class ID mappings before using the node. ...

Filtered Labels Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Nudenet
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 Playground, enabling artists to harness the latest AI tools to create incredible art.