Visit ComfyUI Online for ready-to-use ComfyUI environment
Filter segments based on specified value range for precise segmentation tasks.
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.
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.
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.
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.
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.
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.
target
parameter to "area(=w*h)" and adjust the min_value
and max_value
parameters to define the desired range.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.target
parameter was set to an invalid value.target
parameter is set to one of the allowed values: "area(=w*h)", "width", "height", "x1", "y1", "x2", "y2", or "length_percent".min_value
parameter was set to a negative number.min_value
parameter to a non-negative integer.max_value
parameter was set to a negative number.max_value
parameter to a non-negative integer.min_value
parameter was set to a value greater than the max_value
parameter.min_value
parameter is less than or equal to the max_value
parameter.© Copyright 2024 RunComfy. All Rights Reserved.