Nodes/ComfyUI_KubaNodes/kubakub trim to exact duration (ltx safe)
ComfyUI Node

kubakub trim to exact duration (ltx safe)

A ComfyUI node in kubakub/2d/motion with 6 inputs and 3 outputs.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub trim to exact duration (ltx safe)
  • audio
  • audio
  • actual_start_seconds
  • num_samples
◄start_seconds0.000►
◄duration_seconds9.960►
◄wrap_starttrue►
◄overrun_modeloop►
◄snap_samples_to0►
Categorykubakub/2d/motion

Inputs (6)

NameTypeDefaultDescription
audioAUDIO—
start_secondsFLOAT0.0000–1000000000Start position. Feed your raw cumulative seconds here; with wrap_start on, no upstream modulo is needed.
duration_secondsFLOAT9.9600.001–1000000000Constant clip length. Output sample count is fixed by this.
wrap_startBOOLEANtrueOn: a start past the end of the track wraps around to its beginning (start modulo the track length). Off: the start is used as it is.
overrun_modeCOMBOloopWhen the clip runs past the end of the track: loop = continue from the track start (no silence), silence_pad = fill the rest with silence, clamp = move the clip back so it ends at the end of the track.
snap_samples_tooptINT00–10485760 = off. Rounds the length up to a multiple of this many samples (the audio VAE's sample stride); only for a one-frame drift between sound and picture.

Outputs (3)

NameTypeDescription
audioAUDIOThe clip, always the same number of samples for the same duration.
actual_start_secondsFLOATWhere the clip really starts in the track, in seconds (after wrap / clamp).
num_samplesINTLength of the clip in samples.