ComfyUI Node
kubakub trim to exact duration (ltx safe)
A ComfyUI node in kubakub/2d/motion with 6 inputs and 3 outputs.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| start_seconds | FLOAT | 0.0000–1000000000 | Start position. Feed your raw cumulative seconds here; with wrap_start on, no upstream modulo is needed. |
| duration_seconds | FLOAT | 9.9600.001–1000000000 | Constant clip length. Output sample count is fixed by this. |
| wrap_start | BOOLEAN | true | On: 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_mode | COMBO | loop | When 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_toopt | INT | 00–1048576 | 0 = 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)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | The clip, always the same number of samples for the same duration. |
| actual_start_seconds | FLOAT | Where the clip really starts in the track, in seconds (after wrap / clamp). |
| num_samples | INT | Length of the clip in samples. |