Nodes/ComfyUI-Geeky-LatentSyncWrapper 1.5/Geeky Video Length Adjuster (Fast)
ComfyUI Node

Geeky Video Length Adjuster (Fast)

Your clip is 4 seconds, the audio is 10 — Geeky Video Length Adjuster (Fast) makes them fit

By GeekyGhost·Created about a year ago·Updated 12 months ago· 10
Geeky Video Length Adjuster (Fast)
  • images
  • audio
  • images
  • audio
modenormal
fps25.00
silent_padding_sec0.5

Lip-sync models are picky: they want the video and the audio to be the same length, and in the real world they almost never are. Your talking-head clip runs four seconds, the audio you want the face to speak runs ten. Geeky Video Length Adjuster (Fast) is the small utility that squares that away - it's the shorter, quieter sibling of the Geeky LatentSync pack, and it exists to do one job: take any video + audio pair and hand back a matched pair with the same duration.

It comes from the same fork that brought you Geeky LatentSync 1.5 (Optimized), so it inherits the pack's family traits - the "Geeky" prefix to avoid clashing with other LatentSync wrappers, and the same FFmpeg-and-25fps assumptions. Think of it as the boring-but-necessary prep step in the workflow, the thing you drop between your video loader and the lip-sync node so the model isn't handed a mismatch it can't resolve. LatentSync itself will duplicate frames for a single image, but once you're working with actual clips, matching them up is on you - this is the node for that.

How it works

Nothing magical, which is the point. The node measures the audio duration and computes how many frames the video needs at your chosen fps. Then it picks a strategy:

  • normal - pads the audio with a short tail of silence, then trims the video to match. If the video is shorter than the audio instead, it trims the audio back instead. The default, and the one you'll use 90% of the time.
  • pingpong - if the audio outlasts the video, it extends the clip by playing the frames forward then backward (with endpoints dropped so it doesn't stutter), repeating until the audio fits. Great for a looping b-roll shot behind a voiceover.
  • loop_to_audio - same idea but a plain forward loop instead of the bounce-back. Slightly jankier, but simpler if a hard cut doesn't bother you.

Every mode respects silent_padding_sec (default 0.5), which adds a little breathing room at the end so the last syllable isn't cut off by a hard trim.

The inputs that matter

  • images (IMAGE) - your video frames from a video loader.
  • audio (AUDIO) - from a VHS Load Audio node, the track you're matching to.
  • mode - normal, pingpong, or loop_to_audio, as above. Default normal.
  • fps (FLOAT, default 25, range 1–120) - keep this at 25, because LatentSync expects 25 fps and this number is what the node uses to translate seconds into frame counts. Change it only if you know why.
  • silent_padding_sec (FLOAT, default 0.5, range 0.1–3) - tail silence to add before the trim math runs.

It outputs images and audio of matching length - feed those straight into the Geeky LatentSync node, or into any other node that cares about length alignment.

Installing it

Same pack as the lip-sync node, so one install gets you both. FFmpeg on your PATH, then:

cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/ComfyUI-Geeky-LatentSyncWrapper.git
cd ComfyUI-Geeky-LatentSyncWrapper
pip install -r requirements.txt

Restart ComfyUI and refresh. ComfyUI Manager can do it via search if you prefer. Note that this little utility drags the pack's full dependency list along for the ride - including the mediapipe dependency that makes the whole pack awkward on newer ComfyUI and Python 3.10+. If you only wanted the length matcher, that's a fair bit of machinery to inherit; it ships as part of a lip-sync pack, not as a standalone.

Gotchas

The honest take: if you're not running this pack's LatentSync node, you probably don't need this node either - your video editor already does trim-and-loop, and a standalone AudioLoader + loop node covers most of it. But inside this workflow it's the thing that prevents the classic "lips stopped matching at the two-second mark" failure, and it costs you nothing extra since it's in the pack anyway. Just keep the fps at 25 to match the model, remember the single-image path doesn't need it (the LatentSync node handles that case itself), and don't expect it to do anything clever with silence beyond the padding - it's a length matcher, not an editor.

CategoryGeekyLatentSync

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
audioAUDIO
modeCOMBOnormal3 options: normal, pingpong, loop_to_audio
fpsFLOAT25.001–120
silent_padding_secFLOAT0.50.1–3

Outputs (2)

NameTypeDescription
imagesIMAGE
audioAUDIO