ComfyUI > Nodes > KJNodes for ComfyUI > Create Shape Mask On Path

ComfyUI Node: Create Shape Mask On Path

Class Name

CreateShapeMaskOnPath

Category
KJNodes/masking/generate
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

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

Versatile node for generating masks with specified shapes along a path, customizable dimensions and multiple shape options.

Create Shape Mask On Path:

CreateShapeMaskOnPath is a versatile node designed to generate masks or batches of masks with specified shapes along a defined path. This node is particularly useful for AI artists looking to create complex masking patterns that follow a specific trajectory. By defining the shape, size, and coordinates, you can create intricate designs that can be used in various artistic applications. The node allows for customization of the mask's dimensions and can handle multiple shapes such as circles, squares, and triangles. This flexibility makes it an essential tool for generating dynamic and visually appealing masks.

Create Shape Mask On Path Input Parameters:

shape

This parameter defines the shape of the mask to be created. You can choose from three options: circle, square, and triangle. The default shape is circle. The selected shape will be used to generate the mask along the specified path.

coordinates

This parameter specifies the path coordinates where the mask shapes will be placed. It is a required input and must be provided as a string. The coordinates define the center locations for the shapes, allowing you to create a path for the mask.

frame_width

This parameter sets the width of the frame in which the mask will be created. The default value is 512 pixels, with a minimum of 16 pixels and a maximum of 4096 pixels. Adjusting this value will change the overall width of the generated mask.

frame_height

This parameter sets the height of the frame in which the mask will be created. The default value is 512 pixels, with a minimum of 16 pixels and a maximum of 4096 pixels. Adjusting this value will change the overall height of the generated mask.

shape_width

This parameter defines the width of the individual shapes in the mask. The default value is 128 pixels, with a minimum of 8 pixels and a maximum of 4096 pixels. This value determines the horizontal size of each shape in the mask.

shape_height

This parameter defines the height of the individual shapes in the mask. The default value is 128 pixels, with a minimum of 8 pixels and a maximum of 4096 pixels. This value determines the vertical size of each shape in the mask.

size_multiplier

This optional parameter allows you to scale the size of the shapes in the mask. The default value is 1.0, and it can be adjusted to increase or decrease the size of the shapes proportionally. This parameter is useful for creating masks with varying shape sizes.

Create Shape Mask On Path Output Parameters:

mask

This output parameter provides the generated mask based on the specified input parameters. The mask will contain the shapes placed along the defined path, and it can be used in various artistic applications.

mask_inverted

This output parameter provides an inverted version of the generated mask. The inverted mask can be useful for creating complementary designs or for use in different masking techniques.

Create Shape Mask On Path Usage Tips:

  • Experiment with different shape options (circle, square, triangle) to create unique masking patterns.
  • Use the coordinates parameter to define complex paths for the mask shapes, allowing for intricate designs.
  • Adjust the frame_width and frame_height parameters to fit the mask within your desired canvas size.
  • Utilize the size_multiplier parameter to create masks with varying shape sizes for added visual interest.

Create Shape Mask On Path Common Errors and Solutions:

"Invalid coordinates format"

  • Explanation: The coordinates provided are not in the correct format.
  • Solution: Ensure that the coordinates are provided as a string in the correct format, specifying the center locations for the shapes.

"Shape size out of bounds"

  • Explanation: The specified shape width or height is outside the allowed range.
  • Solution: Adjust the shape_width and shape_height parameters to be within the minimum and maximum values (8 to 4096 pixels).

"Frame size out of bounds"

  • Explanation: The specified frame width or height is outside the allowed range.
  • Solution: Adjust the frame_width and frame_height parameters to be within the minimum and maximum values (16 to 4096 pixels).

Create Shape Mask On Path Related Nodes

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