ComfyUI  >  Nodes  >  ComfyUI Impact Pack >  SEGS Filter (label)

ComfyUI Node: SEGS Filter (label)

Class Name

ImpactSEGSLabelFilter

Category
ImpactPack/Util
Author
Dr.Lt.Data (Account age: 458 days)
Extension
ComfyUI Impact Pack
Latest Updated
6/19/2024
Github Stars
1.4K

How to Install ComfyUI Impact Pack

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

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

SEGS Filter (label) Description

Filter segments based on labels to isolate specific types within AI art projects.

SEGS Filter (label):

The ImpactSEGSLabelFilter node is designed to filter segments (SEGS) based on specified labels, allowing you to isolate and work with specific types of segments within your AI art projects. This node is particularly useful when you need to focus on certain elements within a segmented image, such as filtering out unwanted segments or highlighting specific areas of interest. By providing a list of labels, the node will return only those segments that match the given labels, making it easier to manage and manipulate your segmented data. This functionality is essential for tasks that require precise control over the segments being processed, ensuring that only relevant segments are included in subsequent operations.

SEGS Filter (label) Input Parameters:

segs

This parameter represents the segments (SEGS) that you want to filter. It is a required input and should be provided in the SEGS format. The segments are the primary data that will be processed by the node to filter out the desired labels.

preset

This parameter allows you to select a preset from a predefined list of segment types. The available options include all and other detection labels defined in the system. The preset helps in quickly applying a common filter without manually specifying each label. The default value is all.

labels

This parameter is a string that contains the list of labels you want to filter, separated by commas. It allows you to specify the exact types of segments you are interested in. For example, you might list labels like car, person, tree to filter out only those segments. This input is essential for customizing the filter to match your specific needs.

SEGS Filter (label) Output Parameters:

SEGS

The output parameter is the filtered segments (SEGS) that match the specified labels. This output retains the original SEGS format but includes only those segments that meet the filtering criteria. It allows you to proceed with further processing or analysis on a refined set of segments, ensuring that only relevant data is used in subsequent steps.

SEGS Filter (label) Usage Tips:

  • To quickly filter out common segment types, use the preset parameter with the all option to include all available labels.
  • When specifying multiple labels in the labels parameter, ensure they are separated by commas and match the exact label names used in your segmentation data.
  • Use this node in combination with other SEGS processing nodes to create a streamlined workflow that focuses on specific segments of interest.

SEGS Filter (label) Common Errors and Solutions:

Warning: length of labels ({len(labels)}) != length of segs ({len(segs[1])})

  • Explanation: This warning indicates that the number of labels provided does not match the number of segments in the SEGS data.
  • Solution: Ensure that the number of labels specified in the labels parameter matches the number of segments in your SEGS data. Adjust the labels list accordingly to resolve this mismatch.

No segments match the specified labels

  • Explanation: This error occurs when none of the segments in the SEGS data match the labels provided in the labels parameter.
  • Solution: Double-check the labels specified in the labels parameter to ensure they are correct and match the labels used in your segmentation data. Adjust the labels as needed to include valid segment types.

SEGS Filter (label) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Impact Pack
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.