ComfyUI > Nodes > ComfyUI_Mira > Create Nested PNG Mask

ComfyUI Node: Create Nested PNG Mask

Class Name

CreateNestedPNGMask

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

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

Create Nested PNG Mask Description

Generate intricate nested PNG mask images with flexible layout parameters for AI art projects.

Create Nested PNG Mask:

The CreateNestedPNGMask node is designed to generate a nested PNG mask image based on specified dimensions and layout parameters. This node is particularly useful for creating complex, layered mask images that can be used in various AI art projects. By defining the width, height, and other positional parameters, you can create intricate nested rectangles within a PNG image. This node also allows for unlimited expansion in all directions, making it highly flexible for different artistic needs. The primary goal of this node is to provide a robust tool for generating detailed and customizable mask images, which can be used to enhance the depth and complexity of your AI-generated artwork.

Create Nested PNG Mask Input Parameters:

Width

The width of the PNG image to be created. This parameter defines the horizontal dimension of the output image. The value should be a positive integer representing the number of pixels. For example, a width of 800 will create an image that is 800 pixels wide.

Height

The height of the PNG image to be created. This parameter defines the vertical dimension of the output image. The value should be a positive integer representing the number of pixels. For example, a height of 600 will create an image that is 600 pixels tall.

X

The X-coordinate for the starting point of the nested rectangles. This parameter determines the horizontal position where the nesting begins. The value should be a positive integer.

Y

The Y-coordinate for the starting point of the nested rectangles. This parameter determines the vertical position where the nesting begins. The value should be a positive integer.

unlimit_top

A boolean parameter that, when enabled, allows the nested rectangles to expand infinitely upwards. This provides flexibility in creating masks that are not confined to a fixed height.

unlimit_bottom

A boolean parameter that, when enabled, allows the nested rectangles to expand infinitely downwards. This provides flexibility in creating masks that are not confined to a fixed height.

unlimit_left

A boolean parameter that, when enabled, allows the nested rectangles to expand infinitely to the left. This provides flexibility in creating masks that are not confined to a fixed width.

unlimit_right

A boolean parameter that, when enabled, allows the nested rectangles to expand infinitely to the right. This provides flexibility in creating masks that are not confined to a fixed width.

Layout

A string parameter that defines the layout pattern for the nested rectangles. The default value is #. This parameter allows you to specify a custom layout for the nested rectangles, providing additional control over the mask's design.

Create Nested PNG Mask Output Parameters:

PngImage

The generated PNG image containing the nested rectangles. This output is the primary result of the node and can be used directly in your AI art projects.

PngColorMasks

A list containing the color information of all the nested rectangles within the PNG image. This output is useful for further processing or analysis of the mask's color properties.

PngRectangles

A list containing the rectangle information of all the nested rectangles within the PNG image. This output provides detailed positional data for each rectangle, which can be used for additional customization or processing.

Debug

A string containing debug information. This output is useful for troubleshooting and understanding the internal workings of the node during execution.

Create Nested PNG Mask Usage Tips:

  • Experiment with different Width and Height values to create masks of various sizes that fit your specific project needs.
  • Use the unlimit_top, unlimit_bottom, unlimit_left, and unlimit_right parameters to create masks that are not confined to a fixed size, allowing for more creative freedom.
  • Adjust the Layout parameter to customize the pattern of the nested rectangles, adding unique designs to your masks.

Create Nested PNG Mask Common Errors and Solutions:

"Invalid dimensions provided"

  • Explanation: This error occurs when the Width or Height parameters are set to non-positive values.
  • Solution: Ensure that both Width and Height are positive integers.

"Invalid starting coordinates"

  • Explanation: This error occurs when the X or Y parameters are set to non-positive values.
  • Solution: Ensure that both X and Y are positive integers.

"Layout pattern not recognized"

  • Explanation: This error occurs when the Layout parameter is set to an unsupported value.
  • Solution: Use a valid layout pattern, such as the default #, or refer to the documentation for supported patterns.

Create Nested PNG Mask 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.