ComfyUI  >  Nodes  >  ComfyUI_Mira >  PngRectangles to Masks

ComfyUI Node: PngRectangles to Masks

Class Name

PngRectanglesToMaskList

Category
Mira/Mask
Author
mirabarukaso (Account age: 1261 days)
Extension
ComfyUI_Mira
Latest Updated
7/25/2024
Github Stars
0.0K

How to Install ComfyUI_Mira

Install this extension via the ComfyUI Manager by searching for  ComfyUI_Mira
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Mira 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PngRectangles to Masks Description

Convert PNG rectangles to masks with intensity and blur settings for precise control, simplifying mask creation for AI artists.

PngRectangles to Masks:

The PngRectanglesToMaskList node is designed to convert a list of PNG rectangles into a mask with specified intensity and blur settings. This node is particularly useful for AI artists who need to create masks directly from rectangle data, allowing for precise control over the mask's appearance. By adjusting parameters such as intensity and blur, you can achieve a variety of effects, from solid masks to more nuanced, blurred edges. This node simplifies the process of mask creation, making it accessible even to those without a deep technical background.

PngRectangles to Masks Input Parameters:

PngRectangles

This parameter takes a list of PNG rectangles, which is typically generated from the Create PNG Mask function. The list contains the rectangle data that will be used to create the mask. This input is essential as it defines the areas that will be masked.

Intenisity

The Intenisity parameter controls the intensity of the mask. It accepts a floating-point value between 0.0 and 1.0, with a default value of 1.0. A value of 1.0 results in a solid mask, while lower values produce a more transparent mask. Adjusting this parameter allows you to fine-tune the opacity of the mask.

Blur

The Blur parameter determines the amount of blur applied to the mask. It accepts a floating-point value starting from 0.0, with a default value of 0.0. A value of 0.0 results in a solid mask with sharp edges, while higher values create a more blurred, softer edge. This parameter is useful for creating masks with gradual transitions.

Start_At_Index

The Start_At_Index parameter specifies the starting index of the rectangle list from which the mask creation should begin. It accepts an integer value with a default of 0. This parameter allows you to control which part of the rectangle list is used, providing flexibility in mask creation.

Overlap

The Overlap parameter determines whether to combine the current mask with previous or next masks. It accepts three options: Previous, Next, or None. This parameter is useful for creating complex masks by combining multiple rectangles.

Overlap_Count

The Overlap_Count parameter specifies the number of previous or next masks to combine with the current mask. It accepts an integer value and works in conjunction with the Overlap parameter. This allows for more intricate mask designs by layering multiple masks.

PngRectangles to Masks Output Parameters:

mask

The mask output is the final mask generated from the specified PNG rectangles, intensity, and blur settings. This mask can be used in various applications, such as image editing or AI art generation, to define areas of interest or apply effects selectively.

PngRectangles to Masks Usage Tips:

  • Experiment with the Intenisity and Blur parameters to achieve the desired mask effect. Higher intensity values create more opaque masks, while higher blur values soften the edges.
  • Use the Start_At_Index parameter to focus on specific parts of your rectangle list, allowing for targeted mask creation.
  • Combine multiple masks using the Overlap and Overlap_Count parameters to create complex and layered mask effects.

PngRectangles to Masks Common Errors and Solutions:

"Index out of range"

  • Explanation: This error occurs when the Start_At_Index or Overlap_Count parameters reference an index outside the bounds of the PngRectangles list.
  • Solution: Ensure that the Start_At_Index and Overlap_Count parameters are within the valid range of the PngRectangles list.

"Invalid intensity value"

  • Explanation: This error occurs when the Intenisity parameter is set to a value outside the range of 0.0 to 1.0.
  • Solution: Adjust the Intenisity parameter to a value within the valid range (0.0 to 1.0).

"Invalid blur value"

  • Explanation: This error occurs when the Blur parameter is set to a negative value.
  • Solution: Ensure that the Blur parameter is set to a non-negative value.

"Invalid overlap option"

  • Explanation: This error occurs when the Overlap parameter is set to a value other than Previous, Next, or None.
  • Solution: Set the Overlap parameter to one of the valid options: Previous, Next, or None.

PngRectangles to Masks Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Mira
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.