Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-RefineNode > RefineNode Slice And Match Masks

ComfyUI Node: RefineNode Slice And Match Masks

Class Name

RefineNodeSliceAndMatchMasks

Category
RefineNode/Mask
Author
1Kynx (Account age: 102days)
Extension
ComfyUI-RefineNode
Latest Updated
2026-05-10
Github Stars
0.02K

How to Install ComfyUI-RefineNode

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

RefineNode Slice And Match Masks Description

Process and manipulate image masks by slicing into segments and matching based on criteria for detailed image processing.

RefineNode Slice And Match Masks:

The RefineNodeSliceAndMatchMasks node is designed to process and manipulate image masks by slicing them into smaller segments and matching these segments based on specified criteria. This node is particularly useful in scenarios where you need to analyze or modify specific regions of an image mask, allowing for more detailed and targeted image processing. By slicing masks into a grid of rows and columns, it enables you to focus on smaller areas, which can be crucial for tasks that require high precision. Additionally, the node offers various matching modes to align and compare these mask segments, enhancing the flexibility and adaptability of your image processing workflow. Whether you are working with a single mask or comparing two masks, this node provides a robust framework for refining and analyzing mask data, making it an essential tool for AI artists looking to enhance their image manipulation capabilities.

RefineNode Slice And Match Masks Input Parameters:

min_area_ratio

The min_area_ratio parameter determines the minimum area ratio for the mask segments to be considered valid during the slicing process. It ensures that only segments with a significant area are processed, which helps in filtering out noise or irrelevant small segments. The value is clamped between 0.01 and 1.0, with a default minimum of 0.01, ensuring that even the smallest segments are accounted for if needed.

rows

The rows parameter specifies the number of horizontal divisions to slice the mask into. This parameter allows you to control the granularity of the slicing process, with a minimum of 1 and a maximum of 16 rows. By adjusting this parameter, you can focus on larger or smaller horizontal sections of the mask, depending on your specific needs.

columns

The columns parameter defines the number of vertical divisions for slicing the mask. Similar to the rows parameter, it allows for control over the vertical granularity, with values ranging from 1 to 16. This parameter is crucial for determining how finely the mask is divided vertically, enabling detailed analysis or modification of specific vertical sections.

auto_match_orientation

The auto_match_orientation parameter is a boolean that determines whether the orientation of the mask segments should be automatically matched. This feature is useful when working with masks that may have varying orientations, ensuring that the segments are aligned correctly for further processing.

match_mode

The match_mode parameter specifies the method used to match the sliced mask segments. It offers options such as "union", "repeat_mask1", and "pair_by_index", each providing a different approach to matching. This parameter is essential for defining how the segments from one or two masks are compared and aligned, impacting the overall results of the node's processing.

output_mode

The output_mode parameter determines the format of the output, with options like "mask" and "bbox". This parameter allows you to choose whether the output should be the mask segments themselves or their bounding boxes, providing flexibility in how the results are utilized in subsequent processing steps.

RefineNode Slice And Match Masks Output Parameters:

mask

The output parameter mask represents the processed and sliced mask images. Depending on the output_mode selected, this could be the actual mask segments or their bounding boxes. This output is crucial for further image processing tasks, as it provides the refined and segmented mask data that can be used for detailed analysis or modification.

RefineNode Slice And Match Masks Usage Tips:

  • To achieve optimal results, carefully adjust the rows and columns parameters based on the level of detail required for your task. More rows and columns will result in finer segmentation, which is useful for detailed analysis.
  • Utilize the match_mode parameter to experiment with different matching strategies. For instance, using "pair_by_index" can be beneficial when you need to compare corresponding segments from two masks.

RefineNode Slice And Match Masks Common Errors and Solutions:

Connect at least one mask input.

  • Explanation: This error occurs when neither mask1 nor mask2 is provided as input to the node.
  • Solution: Ensure that at least one mask input is connected to the node. If you only have one mask, connect it to mask1.

Missing valid RefineNode info items for mask restore.

  • Explanation: This error indicates that the necessary information for restoring the mask to its original space is missing.
  • Solution: Verify that the input information contains valid items required for mask restoration. Ensure that the info parameter is correctly populated with the necessary data.

RefineNode Slice And Match Masks Related Nodes

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

RefineNode Slice And Match Masks