Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

NormalizedAmplitudeToMask

Documentation for ComfyUI Node: NormalizedAmplitudeToMask

Overview

The NormalizedAmplitudeToMask node is designed for use within the ComfyUI framework, specifically as part of audio-related workflows. This node acts as a bridge to support nodes from the AudioScheduler repository, which allows for dynamic visual manipulation based on audio amplitude. It generates masks from normalized amplitude values provided as input, making it a versatile tool for creating audio-reactive visual content.

Functionality

This node creates image masks by processing a sequence of normalized amplitude values. Depending on the configuration, it can apply different shapes, colors, and transformations to these masks, influencing how audio data visually represents itself in a given workflow.

Inputs

The node accepts the following inputs:

  • Normalized Amplitude: A sequence of normalized amplitude values that range from 0 to 1. This is the primary driver for dynamic mask generation.

  • Width: Width of the output mask image. Acceptable values range from 16 to 4096 pixels, with a default value of 512 pixels.

  • Height: Height of the output mask image. Acceptable values range from 16 to 4096 pixels, with a default value of 512 pixels.

  • Frame Offset: Allows temporal shifting of amplitude frames. Values can range from -255 to 255, with a default of 0.

  • Location X & Y: The central position of the shape within the mask. Both coordinates can range between 0 and 4096, with default values set at 256.

  • Size: Determines the relative size of the shape based on the amplitude. Acceptable values span from 8 to 4096 pixels, with a default of 128 pixels.

  • Shape: Specifies the geometric shape to draw, such as 'none', 'circle', 'square', or 'triangle'. Default is 'none', which means the entire image area is filled.

  • Color: Dictates the fill color, either 'white' for a static color or 'amplitude' to fill based on the amplitude's intensity. Default setting uses 'amplitude'.

Outputs

  • Mask: The node outputs a generated mask using audio amplitude data. This mask can be used in various visual workflows for creating audio-reactive effects.

Usage in ComfyUI Workflows

The NormalizedAmplitudeToMask node is typically used in workflows that involve processing audio files in parallel with visual media. Some typical use cases include:

  • Synchronization of Visuals to Audio: By applying masks that change based on amplitude, it creates visuals that respond dynamically to audio elements of a project.

  • Audio-Driven Mask Generation: Masks generated from audio data could be used for revealing or hiding parts of an image or video in sync with music or sound effects.

  • Dynamic Effects in Animation: Incorporating the node in animation through ComfyUI allows for levels of dynamic response not achievable by static visual elements.

Special Features and Considerations

  • Amplitude-Based Scaling: The node dynamically adjusts the size and color intensity of shapes based on audio amplitude levels, providing intuitive controls over visual representation.

  • Multiple Shapes Support: Users can choose between several geometric shapes, adding flexibility in visual storytelling.

  • Integration with AudioScheduler: Designed as part of an advanced workflow incorporating the AudioScheduler node set, requiring a separate setup from AudioScheduler on GitHub.

  • Visualization and Animation: Especially effective when used in animations or video projects where the visual representation needs to change fluidly with the accompanying audio.

The NormalizedAmplitudeToMask node offers significant potential for users looking to incorporate highly customized audio-reactive visual elements within their ComfyUI workflows.