ComfyUI  >  Nodes  >  GraftingRayman >  GR Mask Create

ComfyUI Node: GR Mask Create

Class Name

GR Mask Create

Category
GraftingRayman/Mask
Author
GraftingRayman (Account age: 193 days)
Extension
GraftingRayman
Latest Updated
7/23/2024
Github Stars
0.0K

How to Install GraftingRayman

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

GR Mask Create Description

Generate customizable image masks for AI art and image manipulation with precise control over dimensions and placement.

GR Mask Create:

The GR Mask Create node is designed to generate a mask for image processing tasks, particularly useful in AI art and image manipulation. This node allows you to create a mask with a specified width and position within an image, providing a transparent area that can be used for various artistic effects or image segmentation purposes. By defining the height, width, mask width, and position percentage, you can precisely control the mask's dimensions and placement, making it a versatile tool for customizing image masks to fit your creative needs.

GR Mask Create Input Parameters:

height

The height parameter specifies the height of the mask in pixels. It determines the vertical dimension of the mask and must be an integer value greater than or equal to 1. This parameter is crucial as it defines the overall size of the mask along the vertical axis.

width

The width parameter specifies the width of the mask in pixels. It determines the horizontal dimension of the mask and must be an integer value greater than or equal to 1. This parameter is essential for defining the overall size of the mask along the horizontal axis.

mask_width

The mask_width parameter defines the width of the transparent area within the mask as a fraction of the total width. It is a float value ranging from 0 to 1, where 0 means no transparent area and 1 means the entire width is transparent. This parameter allows you to control how much of the image will be masked.

position_percentage

The position_percentage parameter specifies the starting position of the transparent area within the mask as a fraction of the total width. It is a float value ranging from 0 to 1, where 0 means the transparent area starts at the left edge and 1 means it starts at the right edge. This parameter helps you position the transparent area precisely within the image.

GR Mask Create Output Parameters:

MASK

The MASK output parameter is the generated mask based on the specified input parameters. It is a tensor with the same height and width as defined in the input, containing a transparent area as specified by the mask_width and position_percentage parameters. This mask can be used in various image processing tasks to isolate or highlight specific regions of an image.

GR Mask Create Usage Tips:

  • To create a mask that covers the entire width of the image, set the mask_width parameter to 1.
  • Use the position_percentage parameter to shift the transparent area horizontally within the image, allowing for precise placement of the mask.
  • Experiment with different mask_width values to achieve varying levels of transparency and masking effects in your images.

GR Mask Create Common Errors and Solutions:

ValueError: mask_size is too small, resulting in zero mask dimensions.

  • Explanation: This error occurs when the mask_size parameter is set too low, resulting in a mask dimension of zero.
  • Solution: Increase the mask_size parameter to ensure that the mask dimensions are greater than zero.

Invalid input: height and width must be greater than or equal to 1.

  • Explanation: This error occurs when the height or width parameters are set to values less than 1.
  • Solution: Ensure that both height and width parameters are set to integer values greater than or equal to 1.

GR Mask Create Related Nodes

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