Nodes/IAMCCS-nodes/Audio Timeline Assembler (full track)
ComfyUI Node

Audio Timeline Assembler (full track)

The node that stitches your per-segment audio back into one full track

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
Audio Timeline Assembler (full track)
  • segment_audio
  • timeline_audio
  • timeline_audio
  • timeline_duration_s
  • insert_start_sample
  • insert_end_sample
  • report
insert_modereplace
crossfade_samples0
pad_to_total_durationfalse
segment_start_sample0
segment_start_frames0
fps24.00
total_duration_s0.00

When you generate video in segments, you usually generate the audio as segments too - and then you've got ten small audio clips that need to become one continuous track that matches your final video timeline. IAMCCS_AudioTimelineAssembler is the glue: it takes the audio for the segment you just made and splices it into a growing timeline at the right position.

Mechanically it's a sample-accurate insert. You feed it segment_audio (the new piece) plus an optional timeline_audio (everything so far). The segment_start_sample input tells it where to drop the segment in, in raw samples; or you can pass segment_start_frames plus fps and it converts frames to samples for you. If you don't connect timeline_audio, it treats the incoming segment as the start of a fresh timeline. Either way it returns the merged timeline_audio and reports exactly where it was placed (insert_start_sample, insert_end_sample) plus the running timeline_duration_s.

Two behaviors matter for real use:

  • insert_mode - replace overwrites whatever sits at the insertion point, crossfade blends the incoming segment over the existing audio using crossfade_samples (up to 480k, i.e. 10 seconds at 48kHz). Crossfade is your friend when segments were generated with overlapping context and you want to hide the seam instead of cutting it.
  • pad_to_total_duration - when true (and total_duration_s is set), it pads the timeline out to the full target length so the assembled audio is frame-aligned with your video before you combine them. If you skip this, your master track can come up short and the final mux drifts.

The node also reconciles channel counts (mono in, stereo timeline out, etc.) automatically, which sounds trivial until the first time you splice a mono VO onto a stereo bed and get an error from a dumber tool. It raises a clear error if the incoming segment's sample rate doesn't match the timeline's, and it errors on empty audio - both worth knowing, because "it silently accepted garbage" is the failure mode you're avoiding here.

Where this fits: it's the tail end of the IAMCCS audio pipeline - the AudioSegmentAutoPlanner decides the segment plan, the generation makes each segment, and the Assembler folds them back into one track you can hand to a video-combine or an audio preview. It works fine standalone too: any chunked audio workflow that needs sample-accurate reassembly.

Installing: one node in IAMCCS/IAMCCS-nodes. Install the pack via ComfyUI Manager (search "IAMCCS") or cd ComfyUI/custom_nodes && git clone https://github.com/IAMCCS/IAMCCS-nodes.git, then restart. No models, no extra pip deps - it manipulates the AUDIO tensors directly with torch.

The gotcha to remember: crossfade_samples is in samples, not milliseconds or frames. At 48kHz, 48,000 is a full second. People come in expecting to type "250ms" and get a 250-sample blip that's inaudible. Do the math (or use segment_start_frames for the frame side and let the node handle samples internally). And keep an eye on timeline_duration_s on the last pass - if it's short of your video, pad_to_total_duration is your fix, not a second assemble.

CategoryIAMCCS/Audio

Inputs (9)

NameTypeDefaultDescription
segment_audioAUDIO
insert_modeCOMBOreplace2 options: replace, crossfade
crossfade_samplesINT00–480000
pad_to_total_durationBOOLEANfalse
timeline_audiooptAUDIO
segment_start_sampleoptINT00–2000000000
segment_start_framesoptINT00–100000000
fpsoptFLOAT24.000.001–240
total_duration_soptFLOAT0.000–100000

Outputs (5)

NameTypeDescription
timeline_audioAUDIO
timeline_duration_sFLOAT
insert_start_sampleINT
insert_end_sampleINT
reportSTRING