Visit ComfyUI Online for ready-to-use ComfyUI environment
Intelligently segments masks by analyzing patterns, separating connected regions for precise operations.
The MaskSplitFilter node is designed to intelligently segment masks by identifying and analyzing patterns within the mask data. This node is particularly useful for tasks that require precise separation of connected regions within a mask, leveraging techniques such as valley detection and pattern analysis. By focusing on the depth of valleys and the presence of specific patterns, the MaskSplitFilter can effectively split masks into distinct components, enhancing the accuracy and quality of mask-based operations. This capability is especially beneficial in scenarios where masks need to be divided into smaller, more manageable sections for further processing or analysis.
The mask
parameter is the primary input for the MaskSplitFilter node, representing the mask data that needs to be processed. This input is expected to be in a format that the node can interpret, typically a binary or grayscale image where different regions are represented by varying pixel values. The mask serves as the foundation for the node's operations, as it is the data that will be analyzed and potentially split into separate components.
The valley_depth_threshold
parameter is a floating-point value that determines the sensitivity of the node to valleys within the mask. It ranges from 0.1 to 1.0, with a default value of 0.5. This threshold helps the node identify significant valleys that indicate potential split points. A lower threshold makes the node more sensitive to minor valleys, while a higher threshold focuses on more pronounced valleys, affecting the precision and granularity of the mask splitting.
The pattern_check_range
parameter is an integer that specifies the range within which the node checks for patterns that may influence the splitting process. It ranges from 5 to 50, with a default value of 10. This parameter helps the node determine the extent of pattern analysis, impacting how it identifies and responds to recurring structures within the mask. A larger range allows for a broader analysis, potentially capturing more complex patterns.
The cut_width
parameter is an integer that defines the width of the cut applied to the mask when a split is determined. It ranges from 1 to 10, with a default value of 2. This parameter controls the size of the separation between split regions, influencing the final appearance and separation of the mask components. A wider cut width results in more distinct separation, while a narrower width maintains closer proximity between regions.
The output of the MaskSplitFilter node is a modified MASK
, which represents the processed mask after the splitting operation. This output retains the same format as the input mask but reflects the changes made by the node's operations, such as the separation of connected regions based on the identified valleys and patterns. The output mask is crucial for subsequent processing steps, as it provides a refined and segmented version of the original mask, ready for further analysis or application.
valley_depth_threshold
to fine-tune the sensitivity of the node to different valley depths, which can help in achieving the desired level of mask separation.pattern_check_range
to control the extent of pattern analysis, which can be particularly useful when dealing with masks that have complex or repetitive structures.cut_width
values to achieve the optimal balance between separation and connectivity of mask regions, depending on the specific requirements of your task.valley_depth_threshold
.valley_depth_threshold
to make the node more sensitive to smaller valleys, or verify that the input mask contains features that can be interpreted as valleys.pattern_check_range
is set too low, limiting the node's ability to detect patterns effectively.pattern_check_range
to allow for a broader analysis of the mask, which can help in identifying more complex patterns that influence the splitting process.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.