ComfyUI-KJNodes
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
Available Nodes
CreateFadeMask
CreateFadeMask Node Documentation
Overview
The CreateFadeMask node is a part of the ComfyUI-KJNodes collection on GitHub. This node generates a series of masks with a smooth transition effect, often used for creating visual effects in animations and blending tasks. The node provides various interpolation methods and customization options to cater to different fade requirements.
What This Node Does
CreateFadeMask creates a batch of gradient masks that transition from one level of opacity to another. The transition can be linear or follow easing functions like ease-in, ease-out, or ease-in-out. Users can define initial, midpoint, and final opacity levels, and specify at which frame the midpoint level occurs, allowing for precise control over the fade effect.
Inputs
- invert: A boolean option to invert the gradient mask (black to white becomes white to black).
- frames: An integer input specifying the total number of frames (masks) to generate, with a minimum of 2 frames required.
- width: The width of each generated mask in pixels, with a configurable range.
- height: The height of each generated mask in pixels, allowing users to define mask dimensions.
- interpolation: A dropdown to select the interpolation method, including:
linear: Smooth linear transition between levels.ease_in: Slow start, rapid end transition.ease_out: Rapid start, slow end transition.ease_in_out: Slow start and end with rapid transition in the middle.
- start_level: A float defining the starting opacity level (0.0 to 1.0).
- midpoint_level: A float defining the midpoint opacity level.
- end_level: A float setting the final opacity level.
- midpoint_frame: An integer that specifies the frame index where the midpoint level occurs, allowing customization of the transition timing.
Outputs
- mask: A tensor of generated gradient masks that conform to the specified parameters and interpolation methods.
Usage in ComfyUI Workflows
The CreateFadeMask node is particularly useful in workflows that require smooth transitions or blending effects. Common applications include:
- Animations: Creating fade-in and fade-out effects in animations, ensuring smooth transitions between scenes or objects.
- Blending: Incorporating masks to blend images or videos, allowing for seamless integration of elements.
- Layer Effects: Generating masks for use in multi-layer compositions where gradual opacity changes are needed over time.
By integrating this node, users can achieve sophisticated masking effects in their visual projects, enhancing the aesthetic quality of the output.
Special Features or Considerations
-
Interpolation Variety: The node offers multiple interpolation options, providing flexibility to achieve different fade dynamics and ensuring compatibility with various visual styles.
-
Customization: Users can finely adjust each aspect of the fade effect, such as frame count and opacity levels, allowing for detailed control over the mask's appearance.
-
Configurable Midpoint: The ability to set a specific frame for the midpoint transition makes it possible to create complex fade patterns that meet specific needs or artistic visions.
-
High Precision: With float-level opacity control, users can craft precise fade effects that align with professional standards required in visual production environments.
-
Inverse Capability: The inversion option provides quick adaptability for scenarios requiring opposite fade directions, streamlining workflow adjustments.