Audio Segment Auto Planner (audio -> segmenti)
Turn any audio track into LTX-2 segment math so you don't have to
- audio
- audio_duration_s
- segment_duration_s
- planning_mode
- segment_preset
- overlap_frames
- segment_count
- total_frames
- unique_segment_frames
- first_segment_raw_frames
- continuation_raw_frames
- last_segment_unique_frames
- fps_out
- report
Long-video generation with LTX-2 is chunking: the model has a fixed native context (roughly 8n+1 frames, so 97 or 121), and anything longer means you generate in segments and stitch. The painful part isn't the sampling - it's the frame arithmetic. If you're driving the video from an audio track, you need to know how many segments your audio implies, how many frames each segment gets, and what to carry over between chunks. IAMCCS_AudioSegmentAutoPlanner does that arithmetic for you, which is exactly the kind of thing you don't want to hand-roll in an 80-node graph.
Feed it an AUDIO and an fps, and it computes the full segment plan. split_mode decides how to chunk: either "choose segment count (audio / segments)" - you pick from the segment_count presets (1, 2, 3, 4, 5, 6, 8, 10, 12) - or "choose seconds per segment (auto count)" with target_segment_seconds (5 to 30). Add overlap_frames (default 9) for the frames you'll re-use as context between segments, and ltx_round_mode (up, nearest, or down) for how to round frame counts to LTX-2's 8n+1 constraint.
Then it hands you everything you were about to compute by hand. The outputs that matter:
total_frames/unique_segment_frames- the whole track and how much genuinely new video each segment produces.segment_count- how many chunks this plan needs.first_segment_raw_framesvscontinuation_raw_frames- the first segment usually differs from the rest (it has no context from a previous chunk), so they're reported separately.segment_duration_s,audio_duration_s,fps_out- the numbers you'll wire into samplers and the video combine stage.
The report string is genuinely useful here: it's a plain-English recap of the plan so you can sanity-check before committing to a long generation.
Wire the outputs into the rest of an IAMCCS audio+video chain (the IAMCCS_AudioTimelineAssembler, the timeline gate, or the AU+IMG2VID helper modules), or just use the frame numbers to drive a plain sampler chain - the node doesn't care. The 9-frame default overlap is a good starting point because it matches what the LTX-2 audio-guided extension workflows tend to use; you'll raise it if you see seams between segments, lower it if your VRAM is complaining.
Installing it: it's part of IAMCCS/IAMCCS-nodes. ComfyUI Manager → search "IAMCCS" and install, or cd ComfyUI/custom_nodes && git clone https://github.com/IAMCCS/IAMCCS-nodes.git and restart. No model downloads, no extra dependencies - it's pure frame math over the AUDIO object ComfyUI already gives you.
Two gotchas. First, don't treat segment_count as a hard contract: it's derived from your chosen split mode, so if you pick "count" mode and your audio is 3 seconds long with 12 segments, you'll get segments shorter than the model wants - read segment_duration_s and adjust. Second, ltx_round_mode only matters if you're actually generating with LTX-2's 8n+1 constraint; if you're building for a different backend, nearest is a safer default than up, which tends to round every segment upward and silently inflate your total duration.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| fps | FLOAT | 25.000.001–240 | — |
| split_mode | COMBO | choose segment count (audio / segments) | 2 options: choose segment count (audio / segments), choose seconds per segment (auto count) |
| segment_count | COMBO | 2 | 9 options: 1, 2, 3, 4, 5, 6, +3 |
| target_segment_seconds | COMBO | 10 | 7 options: 5, 8, 10, 12, 15, 20, +1 |
| overlap_frames | INT | 90–4096 | — |
| ltx_round_mode | COMBO | up | 3 options: up, nearest, down |
Outputs (13)
| Name | Type | Description |
|---|---|---|
| audio_duration_s | FLOAT | — |
| segment_duration_s | FLOAT | — |
| planning_mode | STRING | — |
| segment_preset | STRING | — |
| overlap_frames | INT | — |
| segment_count | INT | — |
| total_frames | INT | — |
| unique_segment_frames | INT | — |
| first_segment_raw_frames | INT | — |
| continuation_raw_frames | INT | — |
| last_segment_unique_frames | INT | — |
| fps_out | FLOAT | — |
| report | STRING | — |