Nodes/IAMCCS-nodes/Audio Extender (segment + overlap)
ComfyUI Node

Audio Extender (segment + overlap)

Hand each video segment the audio context it needs

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
Audio Extender (segment + overlap)
  • audio
  • conditioning_audio
  • segment_audio
  • segment_duration_s_out
  • conditioning_duration_s_out
  • segment_start_sample
  • segment_end_sample
  • conditioning_start_sample
  • conditioning_end_sample
  • report
fps25.00
modeleft_context_only
left_overlap_s0.50
right_overlap_s0.00
link_modeuse_timeline_cursor
snap_modesnap_to_video_duration
clamp_policysoft_clamp
segment_index0
segment_duration_s10.00
video_frames249
generated_frames0
extension_frames0
timeline_cursor_frames0
segment_start_frames0
effective_unique_frames0
first_pass_unique_frames0

The audio side of LTX-2 segment extension

When you extend an LTX-2 video segment by segment, every pass needs audio that lines up with the frames it's generating - but the "unique" part of a segment is only the new frames, not the overlap. This node is the audio bookkeeper for that loop: it slices the timeline's audio into two chunks - the conditioning_audio (which includes overlap context) and the segment_audio (just the unique region) - so the model gets the right audio to condition on and the stitcher gets the right audio to lay down.

The controls that matter

Three things shape the slice:

  • mode - how much context surrounds the unique region: left_context_only (default), right_context_only, symmetric_context, or no_overlap. For extension, left context is almost always what you want: the model needs to know what just played, not what's coming.
  • left_overlap_s (0.5) / right_overlap_s (0) - the actual seconds of context. These should match your video overlap in time so audio and frames stay in step.
  • link_mode - how the chunk is tied to the generation timeline. use_timeline_cursor (default) trusts an explicit cursor from the extension math; use_generated_frames / use_extension_frames derive timing from the pass's frame counts; independent_segments ignores the timeline.

The optional numeric inputs are the real interface to the pack's extension system: segment_index, segment_duration_s, video_frames, generated_frames, extension_frames, timeline_cursor_frames, segment_start_frames, and effective_unique_frames - most of them fed by IAMCCS_AudioExtensionMath (the tooltips name it explicitly). clamp_policy (soft_clamp default) decides what happens when the requested range overruns the audio track: trim to bounds, or raise (strict).

Outputs

conditioning_audio and segment_audio (the two slices - wire conditioning into the LTX audio conditioning path and segment audio into the stitcher), segment_duration_s_out / conditioning_duration_s_out, and sample-level bounds: segment_start_sample / segment_end_sample / conditioning_start_sample / conditioning_end_sample. The report string confirms the math.

In the workflow

This is a helper for the pack's LTX-2 extension and SuperNode pipelines - the SuperNodes requirements list it as an expected helper node. It's not something you'd drop into a random graph for fun; it shines when you've got a multi-pass extension loop and your audio keeps drifting out of sync. The classic failure is mismatched numbers: if left_overlap_s says 0.5s but your video overlap is 9 frames at 24fps (≈0.375s), the audio and frames fall out of step over many segments. Keep the overlap values consistent with the video side and the report output will confirm it.

Install is the pack install - ComfyUI Manager, search "IAMCCS", or git clone https://github.com/IAMCCS/IAMCCS-nodes.git into custom_nodes, restart. No model downloads. It expects standard ComfyUI AUDIO objects, so anything that loads audio (VHS, core loaders) feeds it fine.

CategoryIAMCCS/Audio

Inputs (17)

NameTypeDefaultDescription
audioAUDIO
fpsFLOAT25.000.001–240Timeline fps used by the stitched video.
modeCOMBOleft_context_onlyHow much audio context to include around the unique segment region.
left_overlap_sFLOAT0.500–30Context overlap before the unique segment region.
right_overlap_sFLOAT0.000–30Context overlap after the unique segment region.
link_modeCOMBOuse_timeline_cursorHow the audio chunk is linked to the generation timeline.
snap_modeCOMBOsnap_to_video_durationHow nominal segment duration is resolved when not using explicit timeline math.
clamp_policyCOMBOsoft_clampsoft_clamp trims edge segments to the audio bounds; strict raises if the requested range exceeds the track.
segment_indexoptINT00–100000Fallback segment index for independent/fixed timing modes.
segment_duration_soptFLOAT10.000–100000Nominal per-segment duration when not using explicit linked math.
video_framesoptINT2491–100000Nominal video frame count for the current generation pass.
generated_framesoptINT00–100000Raw frames produced by the current pass.
extension_framesoptINT00–100000Unique frames actually added to the stitched timeline.
timeline_cursor_framesoptINT00–10000000Explicit stitched timeline cursor in unique frames.
segment_start_framesoptINT00–10000000Explicit unique segment start frame from AudioExtensionMath.
effective_unique_framesoptINT00–100000Explicit unique frame count from AudioExtensionMath.
first_pass_unique_framesoptINT00–100000Optional explicit unique-frame count for pass 0 when deriving linked ranges statelessly.

Outputs (9)

NameTypeDescription
conditioning_audioAUDIO
segment_audioAUDIO
segment_duration_s_outFLOAT
conditioning_duration_s_outFLOAT
segment_start_sampleINT
segment_end_sampleINT
conditioning_start_sampleINT
conditioning_end_sampleINT
reportSTRING