ComfyUI  >  Nodes  >  ComfyUI_yanc >  😼> Mask Curves

ComfyUI Node: 😼> Mask Curves

Class Name

> Mask Curves

Category
YANC/😼 Masking
Author
ALatentPlace (Account age: 1499 days)
Extension
ComfyUI_yanc
Latest Updated
7/26/2024
Github Stars
0.0K

How to Install ComfyUI_yanc

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

😼> Mask Curves Description

Manipulate, refine mask images with transformations, adjustments for precise, intricate shapes in digital artwork.

😼> Mask Curves:

The > Mask Curves node is designed to manipulate and refine mask images by applying various transformations and adjustments. This node is particularly useful for AI artists who need to create precise and intricate mask shapes for their digital artwork. By leveraging the capabilities of this node, you can achieve smooth transitions, sharp edges, and custom shapes in your masks, enhancing the overall quality and detail of your compositions. The node provides a range of functionalities, including thresholding, growing, cropping, inverting, and feathering masks, allowing for versatile and creative control over mask manipulation.

😼> Mask Curves Input Parameters:

mask

The mask parameter is the primary input for the node, representing the mask image that you want to manipulate. This parameter accepts a mask image, which is typically a grayscale image where different shades of gray represent varying levels of transparency or selection. The mask image serves as the foundation for all subsequent transformations and adjustments applied by the node.

value

The value parameter is used in the thresholding process to determine the cutoff point for converting the mask image into a binary mask. It accepts a floating-point number between 0.0 and 1.0, with a default value of 0.5. This parameter controls the sensitivity of the thresholding operation, where pixels with intensity values above the specified threshold are set to 1 (white), and those below are set to 0 (black).

expand

The expand parameter is used in the mask growing process to control the amount by which the mask is expanded or contracted. It accepts an integer value, with a default of 0, and can range from negative to positive values. Positive values expand the mask, while negative values contract it. This parameter allows you to adjust the size of the mask to better fit your desired shape.

tapered_corners

The tapered_corners parameter is a boolean option that determines whether the corners of the expanded or contracted mask should be tapered. It accepts a boolean value, with a default of True. When enabled, the corners of the mask are smoothed out, creating a more natural and less angular shape.

x

The x parameter specifies the horizontal starting point for cropping the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to define the left boundary of the cropped area.

y

The y parameter specifies the vertical starting point for cropping the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to define the top boundary of the cropped area.

width

The width parameter defines the width of the cropped area. It accepts an integer value, with a default of 512, and can range from 1 to the maximum resolution of the mask image. This parameter allows you to specify the horizontal extent of the cropped area.

height

The height parameter defines the height of the cropped area. It accepts an integer value, with a default of 512, and can range from 1 to the maximum resolution of the mask image. This parameter allows you to specify the vertical extent of the cropped area.

left

The left parameter is used in the feathering process to control the amount of feathering applied to the left edge of the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to create a smooth transition on the left edge of the mask.

top

The top parameter is used in the feathering process to control the amount of feathering applied to the top edge of the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to create a smooth transition on the top edge of the mask.

The right parameter is used in the feathering process to control the amount of feathering applied to the right edge of the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to create a smooth transition on the right edge of the mask.

bottom

The bottom parameter is used in the feathering process to control the amount of feathering applied to the bottom edge of the mask. It accepts an integer value, with a default of 0, and can range from 0 to the maximum resolution of the mask image. This parameter allows you to create a smooth transition on the bottom edge of the mask.

😼> Mask Curves Output Parameters:

mask

The mask output parameter represents the transformed mask image after all the specified adjustments and transformations have been applied. This output is a refined version of the input mask, with changes such as thresholding, growing, cropping, inverting, and feathering incorporated. The resulting mask can be used in further compositing or as a selection tool in your digital artwork.

😼> Mask Curves Usage Tips:

  • Experiment with the value parameter in thresholding to find the optimal cutoff point for your specific mask image, ensuring the desired areas are accurately selected.
  • Use the expand parameter to fine-tune the size of your mask, either expanding it to cover more area or contracting it for a tighter fit.
  • Enable tapered_corners for a smoother and more natural-looking mask shape, especially when working with organic or irregular forms.
  • Adjust the x, y, width, and height parameters to precisely crop your mask, focusing on the most relevant areas for your composition.
  • Apply feathering to the edges of your mask using the left, top, right, and bottom parameters to create smooth transitions and avoid harsh edges.

😼> Mask Curves Common Errors and Solutions:

Mask image not found

  • Explanation: The input mask image is missing or not properly loaded.
  • Solution: Ensure that the mask image is correctly specified and loaded into the node before applying any transformations.

Invalid threshold value

  • Explanation: The value parameter for thresholding is outside the acceptable range (0.0 to 1.0).
  • Solution: Adjust the value parameter to be within the range of 0.0 to 1.0.

Invalid crop dimensions

  • Explanation: The specified crop dimensions (x, y, width, height) exceed the resolution of the mask image.
  • Solution: Verify that the crop dimensions are within the bounds of the mask image resolution and adjust them accordingly.

Feathering parameters out of range

  • Explanation: The feathering parameters (left, top, right, bottom) exceed the resolution of the mask image.
  • Solution: Ensure that the feathering parameters are within the acceptable range based on the mask image resolution and adjust them as needed.

😼> Mask Curves Related Nodes

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