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

ComfyUI Node: Dilate Mask Linear | Akatz

Class Name

AK_AnimatedDilationMaskLinear

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 | Akatz Description

Apply dynamic dilation effect to mask frames for smooth, controlled expansion in AI-generated art animations.

Dilate Mask Linear | Akatz:

The AK_AnimatedDilationMaskLinear node is designed to apply a dynamic dilation effect to a sequence of mask frames, creating an animated transition that can enhance visual storytelling in AI-generated art. This node incrementally adjusts the dilation radius of each frame in a linear fashion, allowing for smooth and controlled expansion or contraction of the mask over time. By manipulating the dilation parameters, you can achieve various artistic effects, such as simulating growth, pulsation, or other organic transformations. The node is particularly useful for creating animations where the mask needs to evolve gradually, providing a seamless and visually appealing result.

Dilate Mask Linear | Akatz Input Parameters:

mask

The mask parameter represents the input mask or a batch of masks that will undergo the dilation process. This parameter is crucial as it defines the initial shape and area that will be affected by the dilation. The mask should be provided as a tensor, typically in a format compatible with PyTorch, to ensure smooth processing. The quality and resolution of the mask can significantly impact the final output, so it is advisable to use high-quality masks for the best results.

shape

The shape parameter determines the geometric form of the dilation kernel used in the process. It can be set to either "circle" or "square," affecting how the dilation is applied to the mask. A circular shape will create a more organic and smooth expansion, while a square shape will result in a more rigid and angular dilation. The choice of shape can influence the artistic style of the animation, so it should be selected based on the desired visual outcome.

dilate_per_frame

The dilate_per_frame parameter specifies the amount by which the dilation radius should increase with each frame. This value controls the speed and extent of the dilation effect, with higher values leading to faster and more pronounced changes. It is important to choose a value that complements the overall animation speed and desired effect, ensuring a harmonious and visually pleasing result.

delay

The delay parameter introduces a pause before the dilation effect begins, measured in frames. This allows for a controlled start to the animation, giving you the flexibility to synchronize the dilation with other elements or events in your project. By adjusting the delay, you can create more complex and coordinated animations, enhancing the narrative or thematic elements of your work.

Dilate Mask Linear | Akatz Output Parameters:

result

The result parameter is the output of the node, providing the sequence of dilated mask frames as a tensor. This output can be used directly in your animation pipeline or further processed to achieve additional effects. The result reflects the cumulative effect of the input parameters, showcasing the dynamic transformation of the mask over time. It is essential to review the output to ensure it aligns with your artistic vision and make any necessary adjustments to the input parameters for optimal results.

Dilate Mask Linear | Akatz Usage Tips:

  • Experiment with different dilate_per_frame values to achieve various animation speeds and effects, ensuring the dilation complements the overall motion in your project.
  • Use the delay parameter to synchronize the dilation effect with other elements in your animation, creating a cohesive and well-timed visual experience.
  • Consider the shape parameter's impact on the artistic style of your animation, choosing between "circle" and "square" to match the desired aesthetic.

Dilate Mask Linear | Akatz Common Errors and Solutions:

"AttributeError: 'Tensor' object has no attribute 'cpu'"

  • Explanation: This error occurs when the input mask is not a PyTorch tensor or is not on the CPU, which is required for processing.
  • Solution: Ensure that the input mask is a PyTorch tensor and transfer it to the CPU using .cpu() before passing it to the node.

"ValueError: Invalid shape parameter"

  • Explanation: This error is raised when the shape parameter is set to a value other than "circle" or "square."
  • Solution: Verify that the shape parameter is correctly set to either "circle" or "square" to avoid this error.

"IndexError: list index out of range"

  • Explanation: This error can occur if the delay parameter is set to a value greater than the number of frames in the mask sequence.
  • Solution: Check the number of frames in your mask sequence and ensure the delay parameter is within this range. Adjust the delay accordingly.

Dilate Mask Linear | 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.