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

ComfyUI Node: Audioreactive Dilate Mask | Akatz

Class Name

AK_AudioreactiveDilationMask

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

Audioreactive Dilate Mask | Akatz Description

Dynamically adjusts mask size based on audio amplitude for synchronized visual effects in AI art.

Audioreactive Dilate Mask | Akatz:

The AK_AudioreactiveDilationMask node is designed to dynamically alter a mask's size in response to audio amplitude, creating a visually engaging effect that synchronizes with sound. This node is particularly useful for AI artists looking to integrate audio-reactive elements into their visual projects, allowing for the creation of animations that pulse or expand in time with music or other audio inputs. By adjusting the mask's dilation based on the amplitude of the audio signal, this node provides a unique way to add rhythm and movement to static images or video frames. The node's primary function is to modulate the mask's size using a dilation process that can be customized in terms of shape, size, and timing, offering a high degree of control over the visual output.

Audioreactive Dilate Mask | Akatz Input Parameters:

mask

The mask parameter represents the initial mask that you want to dilate. It serves as the base image or frame that will be modified by the node. 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.

normalized_amp

The normalized_amp parameter consists of normalized amplitude values derived from an audio signal. These values dictate the extent of the mask's dilation, with higher amplitudes resulting in larger dilations. This parameter should be a list or array of floating-point numbers, each representing the amplitude at a specific point in time.

fps

The fps parameter stands for frames per second and is used for time-based calculations within the node. It determines how quickly the dilation effect progresses over time, with higher values leading to faster transitions. The default value is typically set to 30, which is a common frame rate for video content.

shape

The shape parameter defines the geometric shape of the dilation effect. Options typically include "circle" or "square," with each shape offering a different visual style. The choice of shape affects how the mask expands and can be selected based on the desired aesthetic outcome.

max_radius

The max_radius parameter sets the maximum size to which the mask can dilate. It is measured in pixels and determines the upper limit of the dilation effect. The default value is often set to 25, but it can be adjusted to suit the specific needs of your project.

min_radius

The min_radius parameter specifies the minimum size of the dilation effect, ensuring that the mask does not shrink below a certain threshold. This value is also measured in pixels and is typically set to 0 by default, allowing for complete contraction if desired.

threshold

The threshold parameter is used to determine when the dilation effect should be triggered. It is a floating-point value that sets the minimum amplitude required to initiate the dilation process. The default value is usually around 0.5, but it can be adjusted to make the effect more or less sensitive to audio input.

attack

The attack parameter defines the duration, in seconds, for the dilation effect to reach its maximum size. It controls how quickly the mask expands in response to an increase in amplitude. The default value is often set to 0.5 seconds, providing a smooth transition.

decay

The decay parameter specifies the duration, in seconds, for the dilation effect to return to its minimum size after the amplitude decreases. It controls the rate at which the mask contracts, with a default value typically set to 0.5 seconds for a balanced effect.

attack_function

The attack_function parameter determines the easing function used during the attack phase of the dilation. Common options include "linear" or other easing functions, which affect the smoothness and style of the expansion. The choice of function can significantly impact the visual feel of the effect.

decay_function

The decay_function parameter sets the easing function for the decay phase of the dilation. Similar to the attack function, it influences how the mask contracts, with options like "linear" providing different styles of transition. Selecting the appropriate function can enhance the overall aesthetic of the animation.

Audioreactive Dilate Mask | Akatz Output Parameters:

MASK

The output parameter MASK is the modified version of the input mask after the dilation process has been applied. This output reflects the changes made based on the audio amplitude, resulting in a dynamic and visually engaging effect. The output mask can be used in further processing or directly in visual projects to create audio-reactive animations.

Audioreactive Dilate Mask | Akatz Usage Tips:

  • Experiment with different shape options to see how they affect the visual style of your project. Circles can create a more organic feel, while squares offer a more geometric look.
  • Adjust the attack and decay parameters to synchronize the dilation effect with the tempo of your audio. Faster attack and decay times can create a more responsive effect, while slower times can add a smoother, more gradual transition.
  • Use the threshold parameter to fine-tune the sensitivity of the dilation effect. Lowering the threshold can make the effect more reactive to subtle changes in amplitude, while raising it can focus the effect on more pronounced beats.

Audioreactive Dilate Mask | Akatz Common Errors and Solutions:

"normalized_amp must be an NORMALIZED_AMPLITUDE or FLOAT type"

  • Explanation: This error occurs when the normalized_amp input is not provided in the expected format, which should be either a list of normalized amplitude values or a floating-point number.
  • Solution: Ensure that the normalized_amp input is correctly formatted as a list or array of floating-point numbers representing the audio amplitude at different time points.

"mask must be a MASK type"

  • Explanation: This error indicates that the input provided for the mask parameter is not in the correct format or type expected by the node.
  • Solution: Verify that the mask input is a valid binary or grayscale image that the node can process. Ensure it is compatible with the node's requirements for mask inputs.

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