← See All Custom Node Packs

ComfyUI-LatentSyncWrapper

953

Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. 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

VideoLengthAdjuster

VideoLengthAdjuster Node Documentation

Overview

The VideoLengthAdjuster node is a component of the ComfyUI-LatentSyncWrapper project. This node is designed to adjust the length of a video to match an audio track by adding silent padding, looping, or manipulating frames. It is particularly useful in workflows where the video and audio durations need to be synchronized for seamless playback.

Functionality

The VideoLengthAdjuster node provides three modes of operation to adjust video and audio lengths:

  1. Normal Mode: Adds silent padding to the audio and adjusts the video frames to match the audio duration.
  2. Pingpong Mode: Extends the video by adding a reverse sequence of frames, creating a pingpong effect, and adjusts the length to match the audio.
  3. Loop to Audio Mode: Loops the video frames to match the audio length, with optional silent padding added to the audio.

Inputs

The VideoLengthAdjuster node accepts the following inputs:

  • Images: A sequence of images representing the video frames.
  • Audio: An audio track that includes both the waveform and the sample rate.
  • Mode: Specifies the adjustment mode. Options include normal, pingpong, and loop_to_audio.
  • FPS: The frame rate of the video, which can range from 1 to 120 frames per second. The default value is 25.0 FPS.
  • Silent Padding (sec): The amount of silent padding, in seconds, to add to the audio. This value can range from 0.1 to 3.0 seconds, with a default of 0.5 seconds.

Outputs

The VideoLengthAdjuster node produces the following outputs:

  • Adjusted Images: The sequence of video frames that have been adjusted based on the selected mode.
  • Adjusted Audio: The adjusted audio track with silent padding when applicable.

Usage in ComfyUI Workflows

  • Synchronization: Use the VideoLengthAdjuster node to ensure that video and audio are in sync by extending video frames or adding silent padding to the audio.
  • Creative Effects: The pingpong mode can be used creatively to add a dynamic effect by reversing and playing back the video frames.
  • Looping: Employ the loop_to_audio mode to seamlessly repeat the video frames, ensuring the video matches the audio length for consistent playback.

Special Features and Considerations

  • Frame and Audio Adjustment: The node efficiently manages video and audio resources to ensure proper synchronization without requiring the entire video to be recreated manually.
  • Silent Padding: By adjusting the amount of silent padding, users can customize how the video aligns with the audio, accommodating various editing needs.
  • Video Looping and Pingpong Effects: The node facilitates creating looping or pingpong effects, allowing for enhanced visual storytelling in video projects.

Overall, the VideoLengthAdjuster is a powerful tool for achieving synchronization and creative effects within video and audio workflows in ComfyUI, adding flexibility and control over media timelines.

Related nodes in comfyui-latentsyncwrapper

Want to try ComfyUI-LatentSyncWrapper without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.