ComfyUI Node: Runware Image Masking

Class Name

Runware Image Masking

Category
Runware
Author
Runware Inc. (Account age: 457days)
Extension
Runware.ai ComfyUI Inference API Integration
Latest Updated
2025-03-04
Github Stars
0.05K

How to Install Runware.ai ComfyUI Inference API Integration

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

Runware Image Masking Description

Automated mask generation for precise element enhancement in images, focusing on faces, hands, and people.

Runware Image Masking:

Image Masking is a powerful tool designed to intelligently detect and generate masks for specific elements within images, with a particular focus on faces, hands, and people. Utilizing advanced detection models, this feature significantly enhances the inpainting workflow by automatically creating precise masks around detected elements. This allows for targeted enhancement and detailing, making it easier to refine specific areas of an image without affecting the surrounding content. The node is optimized to work seamlessly with various detection models, ensuring high accuracy and efficiency in mask generation, which is crucial for artists looking to achieve professional-level results in their digital artwork.

Runware Image Masking Input Parameters:

Image

This parameter specifies the input image that will be processed for mask generation. It is the starting point for the node's operation, as the image provided here will be analyzed to detect and mask specific elements.

Detection Model

This parameter allows you to select the specialized detection model to be used for mask generation. Options include models optimized for detecting faces, hands, and people, such as face_yolov8n, mediapipe_face_full, and hand_yolov8n. The default model is face_yolov8n. Choosing the right model is crucial for achieving accurate mask generation based on the elements you wish to target.

Confidence

This parameter sets the confidence threshold for detections. Only elements with confidence scores above this threshold will be included in the mask. The default value is 0.25, with a range from 0 to 1, allowing you to adjust the sensitivity of the detection process to suit your needs.

Max Detections

This parameter limits the maximum number of elements (such as faces, hands, or people) that will be detected and masked in the image. The default is 6, with a range from 1 to 20. This helps manage the complexity of the mask generation process by focusing on the most prominent elements.

Mask Padding

This parameter extends or reduces the detected mask area by a specified number of pixels. Positive values create a larger masked region, while negative values shrink the mask. The default is 4, with a range from -40 to 40, allowing for flexibility in how much of the surrounding area is included in the mask.

Mask Blur

This parameter applies a gradual fade-out effect to the mask, extending it by a specified number of pixels to create smooth transitions between masked and unmasked regions. The default is 4, with a range from 0 to 20, which can be adjusted to achieve the desired level of blending.

outputFormat

This parameter specifies the format in which the output image will be saved. The default format is WEBP, but it can be adjusted based on your requirements for the final output.

Runware Image Masking Output Parameters:

Image

This output provides the original input image, allowing you to compare the processed results with the initial content.

Mask Preview

This output offers a preview of the generated mask, giving you a visual representation of the areas that have been detected and masked. This is useful for verifying the accuracy of the mask before applying further processing.

Mask

This output delivers the final mask, which can be used for inpainting or other image editing tasks. The mask highlights the detected elements, enabling precise modifications to specific areas of the image.

Runware Image Masking Usage Tips:

  • Experiment with different detection models to find the one that best suits the elements you want to mask. For instance, use mediapipe_face_full for detailed facial features.
  • Adjust the Confidence parameter to fine-tune the sensitivity of the detection process. Lower values may include more elements, while higher values ensure only the most confident detections are masked.
  • Utilize Mask Padding and Mask Blur to control the extent and smoothness of the mask edges, which can help achieve more natural-looking results in your final image.

Runware Image Masking Common Errors and Solutions:

Error: "Invalid Detection Model"

  • Explanation: This error occurs when an unsupported detection model is selected.
  • Solution: Ensure that the detection model you choose is one of the supported options listed in the node's parameters.

Error: "Confidence Value Out of Range"

  • Explanation: This error indicates that the confidence value set is outside the acceptable range of 0 to 1. - Solution: Adjust the confidence value to be within the specified range to ensure proper functioning of the node.

Error: "Max Detections Exceeded"

  • Explanation: This error happens when the number of detected elements exceeds the maximum allowed.
  • Solution: Increase the Max Detections parameter if you need to detect more elements, or reduce the number of elements in the image.

Runware Image Masking Related Nodes

Go back to the extension to check out more related nodes.
Runware.ai ComfyUI Inference API Integration
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 Playground, enabling artists to harness the latest AI tools to create incredible art.