ComfyUI > Nodes > Nodes for use with real-time applications of ComfyUI > Quick Shape Mask 🕒🅡🅣🅝

ComfyUI Node: Quick Shape Mask 🕒🅡🅣🅝

Class Name

QuickShapeMask

Category
mask
Author
RyanOnTheInside (Account age: 3947days)
Extension
Nodes for use with real-time applications of ComfyUI
Latest Updated
2025-03-04
Github Stars
0.02K

How to Install Nodes for use with real-time applications of ComfyUI

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

Quick Shape Mask 🕒🅡🅣🅝 Description

Efficiently generates basic shape masks (circles, squares) on canvas for AI artists, enhancing workflow efficiency.

Quick Shape Mask 🕒🅡🅣🅝:

The QuickShapeMask node is designed to efficiently generate basic shape masks, specifically circles and squares, on a given canvas. This node is particularly useful for AI artists who need to create simple yet precise masks for various artistic applications. By leveraging high-performance techniques, QuickShapeMask allows you to define the size, position, and type of shape to be rendered on a canvas, making it a versatile tool for quickly prototyping and experimenting with different mask configurations. Its primary goal is to provide a straightforward and fast way to create shape masks without the need for complex operations, thus enhancing your workflow efficiency.

Quick Shape Mask 🕒🅡🅣🅝 Input Parameters:

shape

This parameter determines the type of shape to be generated in the mask. You can choose between a "circle" or a "square". The default shape is a "circle". Selecting the appropriate shape is crucial as it directly affects the visual outcome of the mask.

width

The width parameter specifies the width of the shape in pixels. It ranges from a minimum of 1 to a maximum of 4096 pixels, with a default value of 64 pixels. Adjusting the width allows you to control the horizontal size of the shape, impacting how much of the canvas the shape will cover.

height

Similar to the width, the height parameter defines the vertical size of the shape in pixels. It also ranges from 1 to 4096 pixels, with a default of 64 pixels. Modifying the height affects the vertical dimension of the shape, enabling you to create proportionate or elongated shapes as needed.

x

This parameter sets the x-coordinate for the center of the shape on the canvas. It ranges from 0 to 4096, with a default value of 256. The x-coordinate determines the horizontal position of the shape, allowing you to place it precisely where needed on the canvas.

y

The y parameter specifies the y-coordinate for the center of the shape on the canvas. It ranges from 0 to 4096, with a default value of 256. This parameter controls the vertical position of the shape, ensuring it is centered correctly according to your design requirements.

canvas_width

This parameter defines the total width of the output mask in pixels. It ranges from 1 to 4096, with a default value of 512 pixels. The canvas width sets the horizontal boundary for the mask, influencing the overall size of the output image.

canvas_height

The canvas height parameter specifies the total height of the output mask in pixels. It ranges from 1 to 4096, with a default value of 512 pixels. This parameter sets the vertical boundary for the mask, affecting the overall dimensions of the output image.

batch_size

This parameter determines the number of masks to be generated simultaneously. It allows you to create multiple instances of the mask in a single operation, which is useful for batch processing or when working with multiple images.

Quick Shape Mask 🕒🅡🅣🅝 Output Parameters:

MASK

The output of the QuickShapeMask node is a tensor representing the generated mask, which contains the specified shape (circle or square) on the defined canvas. This mask is crucial for various artistic and computational tasks, as it can be used to isolate or highlight specific areas of an image. The output is in a format that can be easily integrated into further processing pipelines or used directly in image manipulation tasks.

Quick Shape Mask 🕒🅡🅣🅝 Usage Tips:

  • To create a perfectly centered shape, ensure that the x and y parameters are set to half of the canvas width and height, respectively.
  • Experiment with different width and height values to achieve the desired aspect ratio for your shape, especially when creating non-square rectangles or ellipses.
  • Utilize the batch_size parameter to generate multiple masks at once, which can save time when working on projects that require repetitive mask creation.

Quick Shape Mask 🕒🅡🅣🅝 Common Errors and Solutions:

Shape not appearing on canvas

  • Explanation: The shape might be positioned outside the visible area of the canvas due to incorrect x or y values.
  • Solution: Ensure that the x and y coordinates are within the canvas dimensions and adjust them to bring the shape into view.

Shape is distorted

  • Explanation: The width and height values might not be proportionate, leading to a distorted shape.
  • Solution: Adjust the width and height parameters to maintain the desired aspect ratio for the shape.

Mask output is empty

  • Explanation: The batch_size might be set to zero, resulting in no masks being generated.
  • Solution: Set the batch_size to a positive integer to ensure that masks are created.

Quick Shape Mask 🕒🅡🅣🅝 Related Nodes

Go back to the extension to check out more related nodes.
Nodes for use with real-time applications of ComfyUI
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.