ComfyUI > Nodes > ComfyUI Impact Pack > SEGSRangeFilterDetailerHookProvider

ComfyUI Node: SEGSRangeFilterDetailerHookProvider

Class Name

SEGSRangeFilterDetailerHookProvider

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

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 Online 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

SEGSRangeFilterDetailerHookProvider Description

Filter segments based on specified value range for precise segmentation tasks.

SEGSRangeFilterDetailerHookProvider:

The SEGSRangeFilterDetailerHookProvider is a specialized node designed to filter segments based on a specified range of values. This node is particularly useful for AI artists who need to refine their segmentation results by including or excluding segments that fall within a certain range. By leveraging this node, you can ensure that only the segments meeting your criteria are processed further, enhancing the precision and quality of your segmentation tasks. The node operates by applying a range filter to the segments, allowing you to define the target attribute, the mode of filtering (inside or outside the range), and the minimum and maximum values for the range. This flexibility makes it a powerful tool for detailed and customized segmentation workflows.

SEGSRangeFilterDetailerHookProvider Input Parameters:

target

The target parameter specifies the attribute of the segments that you want to filter. Options include "area(=w*h)", "width", "height", "x1", "y1", "x2", "y2", and "length_percent". This parameter determines which aspect of the segments will be evaluated against the specified range. For example, choosing "width" will filter segments based on their width.

mode

The mode parameter is a boolean that defines whether the filter should include segments inside the specified range or outside it. The default value is True, which means segments within the range will be included. If set to False, segments outside the range will be included. This parameter allows you to control the inclusion criteria for the segments.

min_value

The min_value parameter sets the minimum value for the range filter. It is an integer with a default value of 0, and it must be at least 0. This parameter defines the lower bound of the range, and segments with attribute values below this threshold will be excluded if the mode is set to include segments inside the range.

max_value

The max_value parameter sets the maximum value for the range filter. It is an integer with a default value of 67108864, and it must be at least 0. This parameter defines the upper bound of the range, and segments with attribute values above this threshold will be excluded if the mode is set to include segments inside the range.

SEGSRangeFilterDetailerHookProvider Output Parameters:

DETAILER_HOOK

The DETAILER_HOOK output is the primary result of the node. It is an instance of the SEGSRangeFilterDetailerHook class, which contains the logic for applying the range filter to the segments. This hook can be used in subsequent processing steps to ensure that only the segments meeting the specified criteria are included in the final output.

SEGSRangeFilterDetailerHookProvider Usage Tips:

  • To filter segments based on their area, set the target parameter to "area(=w*h)" and adjust the min_value and max_value parameters to define the desired range.
  • Use the mode parameter to switch between including segments inside the range (default) and excluding them. This can be useful for different segmentation tasks where you need to focus on specific attributes.

SEGSRangeFilterDetailerHookProvider Common Errors and Solutions:

"Invalid target attribute"

  • Explanation: The target parameter was set to an invalid value.
  • Solution: Ensure that the target parameter is set to one of the allowed values: "area(=w*h)", "width", "height", "x1", "y1", "x2", "y2", or "length_percent".

"min_value must be non-negative"

  • Explanation: The min_value parameter was set to a negative number.
  • Solution: Set the min_value parameter to a non-negative integer.

"max_value must be non-negative"

  • Explanation: The max_value parameter was set to a negative number.
  • Solution: Set the max_value parameter to a non-negative integer.

"min_value cannot be greater than max_value"

  • Explanation: The min_value parameter was set to a value greater than the max_value parameter.
  • Solution: Ensure that the min_value parameter is less than or equal to the max_value parameter.

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