ComfyUI > Nodes > ComfyUI-Grounding > Grounding Mask Detector

ComfyUI Node: Grounding Mask Detector

Class Name

GroundingMaskDetector

Category
grounding
Author
PozzettiAndrea (Account age: 2240days)
Extension
ComfyUI-Grounding
Latest Updated
2025-12-22
Github Stars
0.03K

How to Install ComfyUI-Grounding

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

Grounding Mask Detector Description

Detects image masks using various models for consistent, accurate segmentation and object recognition.

Grounding Mask Detector:

The GroundingMaskDetector is a versatile node designed to facilitate the detection of masks in images using various grounding models. Its primary purpose is to automatically identify the type of model being used and apply the appropriate detection method, making it a universal solution for mask generation tasks. This node is particularly beneficial for AI artists who need to extract specific regions or objects from images, as it simplifies the process by handling different model types seamlessly. By leveraging this node, you can achieve consistent and accurate mask detection results, which are crucial for tasks such as image segmentation, object recognition, and other creative applications that require precise image manipulation.

Grounding Mask Detector Input Parameters:

model

The model parameter specifies the grounding model to be used for mask detection. It is crucial as it determines the detection method that will be applied. The model type is automatically detected, ensuring that the most suitable approach is used for the task at hand. This parameter may include options such as different model architectures or configurations, but specific options are not detailed in the provided context. The impact of this parameter is significant, as it directly influences the accuracy and efficiency of the mask detection process.

seed

The seed parameter is used to set the random seed for reproducibility. By providing a specific seed value, you ensure that the mask detection results are consistent across different runs, which is essential for achieving reliable outcomes in your projects. The seed affects the initialization of random number generators used in the detection process, and while the context does not specify minimum or maximum values, it is typically an integer value. Using the same seed value allows you to replicate results, which is particularly useful for debugging and iterative design processes.

Grounding Mask Detector Output Parameters:

image_masks

The image_masks output parameter provides the detected masks from the input image. Each mask corresponds to a specific region or object identified by the grounding model. These masks are crucial for further image processing tasks, such as segmentation or object extraction, allowing you to isolate and manipulate specific parts of an image with precision. The masks are typically represented as binary arrays, where the detected regions are marked, enabling easy integration into various creative workflows.

image_boxes

The image_boxes output parameter contains the bounding boxes extracted from the detected masks. These boxes define the spatial extent of each detected object or region within the image, providing a straightforward way to locate and analyze specific areas. Bounding boxes are essential for tasks that require spatial awareness, such as object tracking or alignment, and they complement the mask data by offering a simplified representation of the detected regions.

image_labels

The image_labels output parameter assigns labels to each detected mask, providing a textual description or identifier for the objects or regions. These labels are derived from the context around the detected regions and are useful for categorizing and organizing the detected elements. Labels enhance the interpretability of the detection results, making it easier to understand and communicate the contents of an image, especially in complex scenes with multiple objects.

Grounding Mask Detector Usage Tips:

  • Ensure that the model parameter is correctly configured to match the type of grounding model you intend to use, as this will optimize the detection process.
  • Use a consistent seed value when you need reproducible results, especially during iterative design or testing phases, to ensure that your outcomes remain stable across different runs.
  • Leverage the output masks and bounding boxes to perform precise image manipulations, such as isolating objects or regions for further processing or creative effects.

Grounding Mask Detector Common Errors and Solutions:

Mask shape doesn't match image shape

  • Explanation: This error occurs when the detected mask's dimensions do not align with the input image's dimensions, which can lead to incorrect mask application.
  • Solution: The node attempts to resize the mask to match the image dimensions using interpolation. Ensure that the input image and model are compatible, and consider adjusting the model or image preprocessing steps if this issue persists.

Model type not recognized

  • Explanation: This error indicates that the specified model type is not supported or incorrectly specified, preventing the node from selecting the appropriate detection method.
  • Solution: Verify that the model parameter is correctly set to a supported model type. Consult the documentation or available model options to ensure compatibility.

Inconsistent results with different seeds

  • Explanation: Using different seed values can lead to variations in the detection results, which may be undesirable in certain applications.
  • Solution: Use a fixed seed value for consistent results across different runs. If variability is needed, document the seed values used for each run to maintain traceability.

Grounding Mask Detector Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Grounding
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.