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
CreateFadeMaskAdvanced
ComfyUI Node: CreateFadeMaskAdvanced
Overview
The CreateFadeMaskAdvanced node is a part of the KJNodes collection for ComfyUI. This advanced node allows users to create a batch of masks with smoothly interpolated fade effects between specified frames and values. The functionality is inspired by Fizz's BatchValueSchedule, offering precise control over the appearance of each mask through the timeline. Ideal for creating animations or transitioning effects, this node provides a range of interpolation methods to achieve diverse fade behaviors.
Functionality
Purpose
The CreateFadeMaskAdvanced node is designed to generate a series of fade masks based on defined control points. These masks can be used to transition from one visual state to another in a controlled manner. The node is highly customizable, allowing for complex fade patterns over a sequence of frames.
Inputs
-
Points String:
- Type: String (multi-line)
- Description: The points string defines the fade process across frames. Each line should specify a frame index (beginning from 0) and the corresponding mask value in parentheses.
- Example:
0:(0.0) 7:(1.0) 15:(0.0)
-
Invert:
- Type: Boolean
- Default: False
- Description: If set to true, the generated masks will be inverted.
-
Frames:
- Type: Integer
- Default: 16
- Description: The total number of frames for which masks will be generated. Determines the batch size.
-
Width:
- Type: Integer
- Default: 512
- Description: The width of each mask in the generated batch.
-
Height:
- Type: Integer
- Default: 512
- Description: The height of each mask in the generated batch.
-
Interpolation:
- Type: Selection (options: "linear", "ease_in", "ease_out", "ease_in_out")
- Description: The interpolation method used to calculate mask values between control points.
Outputs
- Mask:
- Type: MASK
- Description: A batch of masks with interpolated values according to the specified control points and interpolation method.
Usage in Workflows
Basic Workflow Integration
In a typical ComfyUI workflow, the CreateFadeMaskAdvanced node can be integrated wherever dynamic transition effects are desirable. Its primary use cases include:
- Fade Transitions: Smoothly transitioning between two images or visual states, the node generates intermediate masking frames that can be applied in conjunction with blending nodes.
- Complex Animations: Creating animations where gradual changes in visibility or opacity are needed, adding depth and fluidity to UI elements.
How to Use
-
Define Control Points: Before using the node, determine the key frames and corresponding mask values for your animation. These points dictate how the fade will progress over the timeline.
-
Configure Node: Set the node inputs according to your requirements, including frame count, dimensions, and interpolation type.
-
Integrate: Connect the node to suitable animation or transition paths in your workflow, combining its output with compositing or blending nodes to achieve desired effects.
Special Features and Considerations
-
Flexible Interpolation: The node offers multiple interpolation methods, allowing for different transition dynamics:
- Linear: Straight-line transitions between points.
- Ease-In: Slow starts that accelerate towards the midpoint.
- Ease-Out: Quick starts that decelerate towards the end.
- Ease-In-Out: Combines both ease-in and ease-out for natural flow.
-
Precision Control: By specifying exact frame indices and values, users can meticulously control the mask's progression, ensuring a perfect match with their animation needs.
-
Inversion: The node includes an inversion option to quickly toggle between normal and inverted masks, offering flexibility in creating both direct and negated effects.
-
Ease of Use: The interface employs a straightforward string input for point definitions, making it easy to quickly apply complex fade patterns without extensive parameter tweaking.
By implementing CreateFadeMaskAdvanced within ComfyUI, users can leverage its advanced interpolation and control features to create sophisticated fade masks for a variety of UI animation tasks.