Visit ComfyUI Online for ready-to-use ComfyUI environment
Manipulates mask image based on normalized amplitude for dynamic visual effects responsive to audio data, providing interactive transformations.
The OffsetMaskByNormalizedAmplitude
node is designed to manipulate a mask image based on normalized amplitude values. This node is particularly useful for AI artists who want to create dynamic visual effects that respond to audio or other amplitude-based data. By adjusting the mask's position and rotation according to the amplitude values, you can achieve a variety of visual transformations that add a layer of interactivity and responsiveness to your artwork. The node ensures that the amplitude values are normalized within the range of 0 to 1, making it easier to control and predict the transformations. Whether you want to rotate the mask, shift it along the x or y axis, or both, this node provides a flexible and intuitive way to achieve these effects.
The mask
parameter is the input mask image that you want to transform. This image will be manipulated based on the normalized amplitude values to create the desired visual effect.
The x
parameter controls the horizontal shift of the mask. It determines how much the mask will move along the x-axis based on the amplitude values. The value should be a float, with 0 meaning no shift and higher values resulting in more significant shifts.
The y
parameter controls the vertical shift of the mask. It determines how much the mask will move along the y-axis based on the amplitude values. The value should be a float, with 0 meaning no shift and higher values resulting in more significant shifts.
The angle_multiplier
parameter is used to scale the rotation angle of the mask. It multiplies the normalized amplitude values to determine the rotation angle in degrees. A higher multiplier will result in more significant rotations.
The rotate
parameter is a boolean that determines whether the mask should be rotated based on the amplitude values. If set to True
, the mask will be rotated; if set to False
, no rotation will occur.
The normalized_amp
parameter is an array of normalized amplitude values within the range of 0 to 1. These values are used to control the transformations applied to the mask, such as shifting and rotating.
The offsetmask
parameter is the transformed mask image. This output reflects the changes made based on the input parameters and normalized amplitude values, providing a dynamically altered mask that can be used in further processing or as a final visual element.
x
and y
parameters.angle_multiplier
to amplify the rotation based on the amplitude values.rotate
to True
and adjusting the x
, y
, and angle_multiplier
parameters for complex transformations.normalized_amp
values are correctly normalized between 0 and 1 for predictable and controlled transformations.normalized_amp
values are not within the range of 0 to 1. - Solution: Ensure that all values in the normalized_amp
array are clipped or normalized to be within the range of 0 to 1 before passing them to the node.mask
parameter is not a valid image tensor.mask
input is a properly formatted image tensor before using it with the node.mask
does not match the length of the normalized_amp
array.mask
image tensor matches the length of the normalized_amp
array to avoid this error.© Copyright 2024 RunComfy. All Rights Reserved.