Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

CreateGradientMask

CreateGradientMask Node Documentation

Overview

The CreateGradientMask node is a component of the ComfyUI system designed to generate gradient masks. It operates by creating a mask that transitions from one color intensity to another, often used in image processing workflows to apply gradual changes to images or layers.

Features

The node can generate gradient masks based on user-specified dimensions and frames. The masks can be configured to transition from black to white (or vice versa) over a specified width, allowing for smooth, controlled fading effects. Users can opt to invert the gradient, providing flexibility for a range of applications.

Inputs

  • frames: An integer specifying the number of frames in the mask batch. This determines the number of gradient masks produced.

  • width: The width of each gradient mask. Accepts integer values between 16 and 4096 pixels.

  • height: The height of each gradient mask. Accepts integer values between 16 and 4096 pixels.

  • invert: A boolean which, when enabled, inverts the gradient transition. Instead of transitioning from black to white, it will transition from white to black.

Outputs

  • MASK: A batch of gradient masks where the gradient transitions horizontally across the defined width. The intensity shifts from full white to full black or the inverted gradient, based on the user's configuration.

Usage in ComfyUI Workflows

The CreateGradientMask node is versatile and can be integrated into various ComfyUI workflows. It is particularly useful in scenarios where gradual transitions or fade effects are desired. Some potential uses include:

  • Image Blending: Combine images with smooth transitions, creating aesthetically pleasing overlays or blends.

  • Masking Effects: Apply targeted effects on specific parts of an image, using the gradient to control the strength of the impact.

  • Animation: Create smooth visual animations by batching multiple frames that gradually transition through the gradient.

Special Features and Considerations

  • Batch Processing: The node can generate multiple masks in one go by specifying the number of frames, facilitating large-scale batch jobs.

  • Inversion: The ability to invert the gradient pattern adds a layer of customization, enabling different visual effects without the need for additional tooling.

  • Performance: Consider the number of frames and the size of each mask as this affects processing time and resources, especially when processing batches of large dimensions.

The CreateGradientMask node is an effective utility for creating controlled, gradient-based masking effects that can enhance the versatility and creativity of your ComfyUI workflows.