ComfyUI Node: SineWave

Class Name

SineWave

Category
postprocessing/Effects
Author
EllangoK (Account age: 2833days)
Extension
ComfyUI-post-processing-nodes
Latest Updated
2024-08-09
Github Stars
0.16K

How to Install ComfyUI-post-processing-nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-post-processing-nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-post-processing-nodes 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

SineWave Description

Apply sine wave distortion effect to images for dynamic, rhythmic transformations with adjustable parameters and directional customization.

SineWave:

The SineWave node is designed to apply a sine wave distortion effect to an image, creating a visually appealing wave-like transformation. This effect can be used to add dynamic and artistic distortions to your images, making them stand out with a unique, rhythmic pattern. The node works by shifting the pixels of the image based on a sine function, which can be adjusted in terms of amplitude and frequency to achieve the desired intensity and repetition of the wave. You can also choose the direction of the wave, either horizontally or vertically, to further customize the effect. This node is particularly useful for creating abstract art, enhancing textures, or adding a creative twist to your visual projects.

SineWave Input Parameters:

image

The image parameter is the input image to which the sine wave effect will be applied. It should be provided as a tensor, typically representing an image in a batch format. This parameter is essential as it serves as the base on which the sine wave distortion will be performed.

amplitude

The amplitude parameter controls the height of the sine wave, determining how far the pixels are shifted from their original positions. A higher amplitude results in more pronounced waves, while a lower amplitude creates subtler distortions. The value can range from 0 to 150, with a default of 10. Adjusting this parameter allows you to control the intensity of the wave effect.

frequency

The frequency parameter defines the number of wave cycles within the image. A higher frequency results in more waves, creating a denser pattern, while a lower frequency produces fewer, more spread-out waves. The value can range from 0 to 20, with a default of 5. This parameter helps you control the repetition and spacing of the wave effect.

direction

The direction parameter specifies the orientation of the sine wave effect. It can be set to either "horizontal" or "vertical," determining whether the waves will move across the image from left to right or from top to bottom. This option allows you to customize the direction of the distortion to suit your artistic vision.

SineWave Output Parameters:

image

The output image parameter is the resulting image after the sine wave effect has been applied. It is returned as a tensor, maintaining the same dimensions as the input image but with the added wave distortion. This output can be used directly in your projects or further processed with additional effects.

SineWave Usage Tips:

  • Experiment with different amplitude and frequency settings to achieve various artistic effects. Higher amplitudes and frequencies can create more dramatic distortions, while lower values produce subtle, wavy patterns.
  • Use the direction parameter to align the wave effect with the composition of your image. Horizontal waves can complement landscape-oriented images, while vertical waves may enhance portrait-oriented visuals.
  • Combine the SineWave node with other post-processing effects to create complex and unique visual styles. For example, applying a color filter or blending multiple distorted images can result in striking abstract art.

SineWave Common Errors and Solutions:

"Invalid image tensor shape"

  • Explanation: This error occurs when the input image tensor does not have the expected shape, typically a 4D tensor representing a batch of images.
  • Solution: Ensure that the input image tensor is correctly formatted as a 4D tensor with dimensions (batch_size, height, width, channels).

"Amplitude or frequency out of range"

  • Explanation: This error happens when the amplitude or frequency values are set outside their allowed ranges.
  • Solution: Verify that the amplitude is within the range of 0 to 150 and the frequency is within the range of 0 to 20. Adjust the values accordingly to fall within these limits.

"Invalid direction value"

  • Explanation: This error is triggered when the direction parameter is set to a value other than "horizontal" or "vertical."
  • Solution: Ensure that the direction parameter is correctly set to either "horizontal" or "vertical" to apply the sine wave effect in the desired orientation.

SineWave Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-post-processing-nodes
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.