ImageTransformByNormalizedAmplitude
This node technically accepts an array of type NORMALIZED_AMPLITUDE and a batch of IMAGE images as input.
Image Transform By Normalized Amplitude
The ImageTransformByNormalizedAmplitude node technically receives an array of type NORMALIZED_AMPLITUDE and a batch of IMAGE images as input.
The ImageTransformByNormalizedAmplitude node is an image processing node capable of dynamically transforming images based on input audio amplitude data. Its core function is to map the normalized amplitude values of audio to image scaling and displacement operations, thereby creating visual change effects synchronized with the audio rhythm.
Node Function
This node technically receives an array of type NORMALIZED_AMPLITUDE and a batch of IMAGE images as input. Internally, it clips the amplitude values to the range [0, 1] and calculates the cropping dimensions of the image based on the amplitude values to achieve a scaling effect. Additionally, the node supports a cumulative mode, which can accumulate continuous amplitude changes to produce a more intense visual impact. The processed images are output in IMAGE format, maintaining the same batch structure as the input.
Node Parameter Description - ImageTransformByNormalizedAmplitude
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
normalized_amp | NORMALIZED_AMPLITUDE | Yes | - | - | normalized_amp (Input Parameter): Receives normalized audio amplitude data to drive image transformation. The value range is limited to 0.0 to 1.0. |
image | IMAGE | Yes | - | - | image (Input Parameter): Inputs the original image batch to be transformed. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
zoom_scale | FLOAT | Yes | 0.0 | -1.0 - 1.0 (Step: 0.001) | zoom_scale (Input Parameter): Controls the base coefficient for how amplitude affects image scaling. The value range is -1.0 to 1.0, with a step size of 0.001. |
x_offset | INT | Yes | 0 | - | x_offset (Input Parameter): Sets the base offset for the image in the horizontal direction (X-axis). The value range is limited by the system's maximum resolution. |
y_offset | INT | Yes | 0 | - | y_offset (Input Parameter): Sets the base offset for the image in the vertical direction (Y-axis). The value range is limited by the system's maximum resolution. |
cumulative | BOOLEAN | Yes | False | - | cumulative (Input Parameter): Enables cumulative mode. When set to True, the amplitude effect accumulates frame by frame, enhancing the transformation intensity. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | IMAGE (Output Parameter): Outputs the image batch transformed by amplitude-driven effects. |
Usage Scenarios
A typical use case is in workflows that combine audio to generate video. Users can connect the normalized amplitude data output from an AudioScheduler node to this node while inputting a set of keyframe images. The node will automatically apply varying degrees of scaling and offset to each frame based on the real-time audio amplitude, thereby generating a dynamic video sequence that "pulses" or "breathes" in sync with the music rhythm.
Notes
Please note that this node is designed to work with the ComfyUI-AudioScheduler extension to ensure the correct amplitude data format is received. The number of images in the input batch should match the length of the amplitude array; otherwise, errors may occur.
ImageTransformByNormalizedAmplitude Node Source Code Link
The ImageTransformByNormalizedAmplitude node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.