Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate customizable gradient masks for image transitions and effects with direction, scale, offset, and opacity control.
The LayerMask: CreateGradientMask
node is designed to generate a gradient mask that can be applied to images, providing a smooth transition effect from one side of the image to another. This node is particularly useful for creating visually appealing effects such as fades, vignettes, or other gradient-based modifications. By allowing you to specify the direction, scale, and offset of the gradient, as well as the opacity, this node offers a high degree of customization to achieve the desired visual outcome. The primary goal of this node is to enhance your image processing capabilities by enabling the creation of dynamic and adjustable gradient masks that can be tailored to fit various artistic needs.
The width
parameter specifies the width of the gradient mask in pixels. It determines how wide the mask will be, which directly affects the area covered by the gradient. The minimum value is 4, the maximum value is 99999, and the default value is 512. Adjusting this parameter allows you to fit the mask to the specific dimensions of your image.
The height
parameter specifies the height of the gradient mask in pixels. It determines how tall the mask will be, which directly affects the area covered by the gradient. The minimum value is 4, the maximum value is 99999, and the default value is 512. Adjusting this parameter allows you to fit the mask to the specific dimensions of your image.
The gradient_side
parameter allows you to choose the direction from which the gradient will start. The available options are bottom
, top
, left
, right
, and center
. This parameter is crucial for defining the orientation of the gradient effect on your image.
The gradient_scale
parameter controls the intensity of the gradient effect. It determines how quickly the gradient transitions from one side to the other. The minimum value is 1, the maximum value is 9999, and the default value is 100. Adjusting this parameter allows you to fine-tune the smoothness and reach of the gradient.
The gradient_offset
parameter allows you to shift the starting point of the gradient. This can be useful for creating more complex gradient effects or for aligning the gradient with specific features in your image. The minimum value is -9999, the maximum value is 9999, and the default value is 0. Adjusting this parameter provides additional control over the placement of the gradient.
The opacity
parameter controls the transparency of the gradient mask. A value of 100 means the mask is fully opaque, while a value of 0 means it is fully transparent. The minimum value is 0, the maximum value is 100, and the default value is 100. Adjusting this parameter allows you to blend the gradient effect with the underlying image to the desired extent.
The size_as
parameter is optional and allows you to specify another image or mask to match the size of the gradient mask. This can be useful for ensuring consistency across multiple layers or for aligning the gradient mask with other elements in your composition.
The mask
output parameter provides the generated gradient mask. This mask can be used in various image processing tasks to apply gradient effects, blend images, or create complex visual compositions. The mask is returned as a single output, ready to be used in subsequent nodes or processes.
gradient_side
to top
and adjust the gradient_scale
to control the smoothness of the transition.gradient_offset
parameter to align the gradient with specific features in your image, such as centering the gradient on a particular object.opacity
parameter to blend the gradient effect with the underlying image, achieving subtle or dramatic visual results.width
and height
parameters are set within the range of 4 to 99999 pixels.gradient_scale
parameter to be within the range of 1 to 9999.opacity
parameter to a value between 0 and 100.gradient_side
parameter: bottom
, top
, left
, right
, or center
.© Copyright 2024 RunComfy. All Rights Reserved.