ComfyUI > Nodes > Akatz Custom Nodes > Dilate Mask Linear Infinite | Akatz

ComfyUI Node: Dilate Mask Linear Infinite | Akatz

Class Name

AK_DilateMaskLinearInfinite

Category
💜Akatz Nodes/Mask
Author
akatz-ai (Account age: 358days)
Extension
Akatz Custom Nodes
Latest Updated
2025-04-05
Github Stars
0.03K

How to Install Akatz Custom Nodes

Install this extension via the ComfyUI Manager by searching for Akatz Custom Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Akatz Custom Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Dilate Mask Linear Infinite | Akatz Description

Perform linear dilation on masks over frames for dynamic visual effects with precise control and seamless integration in animations.

Dilate Mask Linear Infinite | Akatz:

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.

Dilate Mask Linear Infinite | Akatz Input Parameters:

mask

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.

dilation_schedule

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.

quality_factor

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.

use_percentage

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.

should_composite_subject

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.

subject_mask_color

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.

initial_background_color

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.

Dilate Mask Linear Infinite | Akatz Output Parameters:

result_images

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.

Dilate Mask Linear Infinite | Akatz Usage Tips:

  • To achieve a smooth and visually appealing dilation effect, experiment with different dilation_schedule settings to find the right balance between speed and visual impact.
  • Adjust the 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.
  • Use the should_composite_subject parameter to integrate specific elements into your composition, allowing for more complex and layered visual effects.

Dilate Mask Linear Infinite | Akatz Common Errors and Solutions:

"Invalid mask format"

  • Explanation: This error occurs when the input mask is not in a compatible format for processing.
  • Solution: Ensure that the mask is a binary or grayscale image and is properly formatted for the node's requirements.

"Dilation schedule format error"

  • Explanation: This error indicates that the dilation_schedule parameter is not correctly formatted.
  • Solution: Verify that the schedule is specified in the correct format (start_frame, dilation_speed, (r, g, b)),... and that all values are valid.

"Quality factor out of range"

  • Explanation: The quality_factor is set outside the recommended range, affecting performance or quality.
  • Solution: Adjust the quality_factor to be within the recommended range of 0.25 to 0.15 for optimal results.

Dilate Mask Linear Infinite | Akatz Related Nodes

Go back to the extension to check out more related nodes.
Akatz Custom Nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.