Nodes/Akatz Custom Nodes/Audioreactive Dynamic Dilate Mask | Akatz
ComfyUI Node

Audioreactive Dynamic Dilate Mask | Akatz

The no-frills amp-driven mask dilater

By akatz-ai·Created 2 years ago·Updated 9 months ago· 32
Audioreactive Dynamic Dilate Mask | Akatz
  • mask
  • normalized_amp
  • MASK
shape
max_radius25
min_radius0
quality_factor0.25

Audioreactive Dynamic Dilate Mask is the stripped-down member of the family: a mask goes in, a per-frame amplitude list goes in, and out comes a mask whose dilation tracks the amplitude directly. No attack, no decay, no easing menus, no color compositing - just amplitude-to-radius mapping. It's the node you reach for when you want the effect and you don't want to babysit envelope parameters.

Compared to its sibling Audioreactive Dilate Mask, this one trades control for simplicity. The max_radius/min_radius range still applies, but the radius follows the raw per-frame amplitude immediately, so it responds harder and twitchier. That's a feature for punchy kick-driven effects and a bug for anything that needs smooth motion - if the pulse feels nervous, you want the version with attack/decay, or a curves_mode smoothing upstream on the amplitude list.

How it works

Same core machinery as the rest of the pack: the normalized amplitude picks a target radius inside the min/max range, and OpenCV dilation renders the mask each frame with a circular or square kernel of that radius. quality_factor (default 0.25) trades render speed for edge smoothness - lower values are slower but rounder, and the author suggests dropping toward 0.15 for final renders. The input mask can be a single mask or one per frame.

Inputs

  • mask - the input MASK.
  • normalized_amp - per-frame amplitude values, roughly 0–1. Must be a NORMALIZED_AMPLITUDE or FLOAT type; the node validates this and will complain otherwise.
  • shape - circle or square.
  • max_radius / min_radius - the dilation range (defaults 25 and 0).
  • quality_factor - speed/quality balance, default 0.25.

Output is a MASK batch. From there it feeds the same downstream as any animated mask - inpaint regions, composites, mattes.

Installing it

Part of akatz-ai/ComfyUI-AKatz-Nodes. Install via ComfyUI Manager (search "AKatz") or:

cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
cd ComfyUI-AKatz-Nodes
pip install -r requirements.txt

Restart ComfyUI. No model downloads; requirements are numpy, torch, opencv-python and pydub.

Common issues

Feed it non-normalized amplitude and you'll get a validation error or wild behavior - the pack's Schedule Audio Framesync output is the intended source. And be honest with yourself about which node you need: if the result flutters, this one is supposed to flutter; switch to the attack/decay variant or smooth the amplitude upstream instead of fighting the node.

Category💜Akatz Nodes/Mask

Inputs (6)

NameTypeDefaultDescription
maskMASK
normalized_amp*
shapeCOMBO2 options: circle, square
max_radiusINT25
min_radiusINT0
quality_factorFLOAT0.250–1

Outputs (1)

NameTypeDescription
MASKMASK