ComfyUI > Nodes > KJNodes for ComfyUI > ImageTransformByNormalizedAmplitude

ComfyUI Node: ImageTransformByNormalizedAmplitude

Class Name

ImageTransformByNormalizedAmplitude

Category
KJNodes/audio
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

Install this extension via the ComfyUI Manager by searching for KJNodes for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter KJNodes for ComfyUI 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageTransformByNormalizedAmplitude Description

Transform images based on normalized amplitude values from audio signals for dynamic manipulation and synchronization with audio, creating visually engaging effects.

ImageTransformByNormalizedAmplitude:

The ImageTransformByNormalizedAmplitude node is designed to transform images based on normalized amplitude values, typically derived from audio signals. This node allows you to manipulate images dynamically by applying transformations such as zooming and offsetting, which are controlled by the amplitude values. The primary benefit of this node is its ability to create visually engaging effects that synchronize with audio, making it particularly useful for applications in multimedia art, music videos, and interactive installations. By leveraging normalized amplitude values, the node ensures that transformations are smooth and within a controlled range, enhancing the overall aesthetic experience.

ImageTransformByNormalizedAmplitude Input Parameters:

image

This parameter represents the input image or batch of images that you want to transform. The images should be in a tensor format, typically with dimensions corresponding to batch size, height, width, and channels.

normalized_amp

This parameter is an array of normalized amplitude values, which should be within the range [0, 1]. These values control the extent of the transformations applied to the images. The node ensures that the amplitude values are clipped to this range to maintain consistency and prevent extreme transformations.

zoom_scale

This parameter determines the scale of the zoom effect applied to the images. A higher zoom scale results in more significant zooming based on the amplitude values. The zoom effect is cumulative if the cumulative parameter is set to true.

cumulative

This boolean parameter indicates whether the zoom effect should be cumulative. If set to true, the amplitude values are accumulated over time, resulting in progressively increasing zoom effects.

x_offset

This parameter specifies the horizontal offset applied to the images based on the amplitude values. The offset magnitude is calculated as a product of the amplitude and this parameter.

y_offset

This parameter specifies the vertical offset applied to the images based on the amplitude values. Similar to the x_offset, the offset magnitude is calculated as a product of the amplitude and this parameter.

ImageTransformByNormalizedAmplitude Output Parameters:

transformed_images

This output parameter is a list of transformed image tensors. Each image in the list corresponds to an input image that has been transformed based on the normalized amplitude values. The transformations include zooming and offsetting, resulting in visually dynamic images that reflect the amplitude variations.

ImageTransformByNormalizedAmplitude Usage Tips:

  • To create smooth and visually appealing transformations, ensure that the normalized amplitude values are within the range [0, 1].
  • Experiment with different zoom_scale values to achieve the desired zoom effect. A smaller zoom_scale will result in subtler zooming, while a larger value will create more dramatic effects.
  • Use the cumulative parameter to create progressively increasing zoom effects, which can be particularly effective in synchronizing with rising audio intensity.
  • Adjust the x_offset and y_offset parameters to control the direction and magnitude of the image offsets. This can add a dynamic motion effect to your images.

ImageTransformByNormalizedAmplitude Common Errors and Solutions:

"Normalized amplitude values out of range"

  • Explanation: The normalized amplitude values provided are outside the expected range of [0, 1].
  • Solution: Ensure that the amplitude values are normalized and clipped within the range [0, 1] before passing them to the node.

"Image tensor dimensions mismatch"

  • Explanation: The input image tensor does not have the expected dimensions (batch size, height, width, channels).
  • Solution: Verify that the input image tensor is correctly formatted and matches the expected dimensions.

"Invalid zoom scale value"

  • Explanation: The zoom_scale parameter is set to an invalid value.
  • Solution: Ensure that the zoom_scale parameter is a positive number that defines the desired zoom effect magnitude.

"Offset values causing image shift out of bounds"

  • Explanation: The x_offset or y_offset values are too large, causing the image to shift out of its bounds.
  • Solution: Adjust the x_offset and y_offset values to ensure that the image remains within its bounds after the transformation.

ImageTransformByNormalizedAmplitude Related Nodes

Go back to the extension to check out more related nodes.
KJNodes for ComfyUI
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.