😺NKD Mask Scheduler:
The NKDMaskScheduler is a versatile node designed to generate or modify masks by following a specified schedule of values. This node is particularly useful for AI artists who want to create dynamic effects where the strength of a mask changes over time or across different steps. By feeding a list of values, such as those from the NKD Sigmas Curve, into the schedule method, the node produces a batch of masks where each mask's intensity is scaled according to the corresponding schedule value. This allows for smooth transitions, such as fading a mask from full opacity to complete transparency. The node can operate in two modes: generative, where it creates a solid mask of specified dimensions, or scheduling, where it modifies an existing mask. This flexibility makes it an essential tool for creating complex visual effects without needing deep technical knowledge.
😺NKD Mask Scheduler Input Parameters:
schedule
The schedule parameter accepts a list of float values or a single float, representing the desired mask intensity at each step. This parameter dictates how the mask's strength changes over time, with each value scaling the mask's base intensity. If a single float is provided, it is treated as a constant schedule. The values should typically range from 0.0 to 1.0, where 1.0 represents full mask strength and 0.0 represents no mask.
width
The width parameter specifies the width of the generated mask when no existing mask is provided. It defines the horizontal dimension of the mask in pixels. The default value is 512, with a minimum of 1 and a maximum of 8192. This parameter is crucial for determining the size of the mask in generative mode.
height
The height parameter determines the vertical dimension of the generated mask in pixels when no existing mask is provided. Like width, it has a default value of 512, with a minimum of 1 and a maximum of 8192. This parameter is essential for setting the mask's size in generative mode.
value
The value parameter sets the base intensity of the generated solid mask before applying the schedule. It ranges from 0.0 to 1.0, with a default of 1.0, indicating full intensity. This parameter is used only in generative mode and affects the initial strength of the mask.
mask
The mask parameter is optional and allows you to input an existing mask to be scheduled. If provided, the node will apply the schedule to this mask instead of generating a new one. This parameter is useful for modifying pre-existing masks according to the schedule.
normalize
The normalize parameter is a boolean that, when set to true, scales the schedule values by dividing them by the maximum value in the schedule. This ensures that the peak value maps to 100% mask strength, which is helpful when dealing with schedules that do not naturally range from 0.0 to 1.0. The default is true.
invert
The invert parameter is a boolean that, when enabled, flips the schedule values such that 0 becomes 1 and vice versa. This effectively inverts the mask's intensity, turning full masks into empty ones and vice versa. The default is false, meaning no inversion is applied.
😺NKD Mask Scheduler Output Parameters:
mask
The mask output is a batch of masks generated or modified according to the provided schedule. Each mask in the batch corresponds to a value in the schedule, with its intensity scaled accordingly. This output is crucial for creating dynamic visual effects where mask strength varies over time or steps, allowing for smooth transitions and complex animations.
😺NKD Mask Scheduler Usage Tips:
- To create a smooth fade-out effect, use a schedule that gradually decreases from 1.0 to 0.0. This will transition the mask from full opacity to complete transparency.
- If you want to invert the effect of a schedule, enable the
invertparameter to flip the mask intensities, which can be useful for creating reverse animations.
😺NKD Mask Scheduler Common Errors and Solutions:
"Invalid schedule input"
- Explanation: This error occurs when the
scheduleparameter is not provided or is in an incorrect format. - Solution: Ensure that the
scheduleparameter is a list of floats or a single float value. Check for any typos or incorrect data types.
"Mask dimensions mismatch"
- Explanation: This error happens when the dimensions of the provided mask do not match the expected dimensions.
- Solution: Verify that the input mask dimensions align with the specified
widthandheightparameters, or adjust these parameters accordingly.
