Visit ComfyUI Online for ready-to-use ComfyUI environment
Perform linear dilation on masks over frames for dynamic visual effects with precise control and seamless integration in animations.
The AK_DilateMaskLinearInfinite
node is designed to perform a linear dilation on a given mask or batch of masks over a sequence of frames. This node is particularly useful for creating dynamic visual effects where the mask expands or contracts over time, providing a smooth transition effect. The dilation process is controlled by a schedule that specifies how the mask should change over time, allowing for precise control over the animation. This node is beneficial for artists looking to add depth and movement to their compositions, as it can seamlessly integrate with other visual elements to create compelling animations. By adjusting parameters such as the quality factor and dilation schedule, you can achieve a balance between performance and visual fidelity, making it a versatile tool in your creative workflow.
The mask
parameter is the input mask or a batch of masks that will be subjected to the dilation process. It serves as the base layer upon which the dilation effect is applied. The mask should be in a format compatible with the node's processing capabilities, typically a binary or grayscale image where the areas to be dilated are marked.
The dilation_schedule
parameter defines the schedule for mask dilations. It is specified in the format (start_frame, dilation_speed, (r, g, b)),...
, where each tuple represents a point in time and the corresponding dilation speed and color. This schedule allows you to control how the mask expands or contracts over the sequence of frames, providing flexibility in creating dynamic effects.
The quality_factor
parameter influences the quality of the dilation effect. It is recommended to set this value between 0.25 and 0.15 to achieve a good balance between quality and processing speed. A lower quality factor may result in faster processing but at the cost of visual fidelity, while a higher factor enhances the visual quality but may require more computational resources.
The use_percentage
parameter is a boolean that specifies whether the start_frame
in the dilation_schedule
should be interpreted as a percentage of the total frames. When set to True
, the start_frame
is calculated as a percentage, allowing for more intuitive control over the timing of the dilation effect relative to the entire sequence.
The should_composite_subject
parameter is a boolean that determines whether the subject mask should be composited over the final result. When enabled, the subject mask is overlaid on the dilated mask, allowing for the integration of specific elements into the final composition.
The subject_mask_color
parameter specifies the color of the subject mask in the format "R, G, B"
. This color is used when compositing the subject mask over the final result, allowing you to customize the appearance of the subject within the composition.
The initial_background_color
parameter defines the color of the initial background in the format "R, G, B"
. This color serves as the base layer upon which the mask and any composited elements are applied, providing a starting point for the visual composition.
The result_images
output parameter is a sequence of images representing the dilated masks over the specified frames. Each image in the sequence corresponds to a frame in the input mask sequence, with the dilation effect applied according to the specified schedule and parameters. This output is crucial for visualizing the dynamic changes in the mask over time and can be used in further compositing or animation processes.
dilation_schedule
settings to find the right balance between speed and visual impact.quality_factor
to optimize performance; a lower value can speed up processing but may reduce visual quality, while a higher value enhances quality at the cost of speed.should_composite_subject
parameter to integrate specific elements into your composition, allowing for more complex and layered visual effects.dilation_schedule
parameter is not correctly formatted.(start_frame, dilation_speed, (r, g, b)),...
and that all values are valid.quality_factor
is set outside the recommended range, affecting performance or quality.quality_factor
to be within the recommended range of 0.25 to 0.15 for optimal results.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.