Two Segment Planner (stable 2SEG)
Plan your LTX video in two chunks before you spend a single sample
- seg0_start_frames
- seg0_end_frames
- seg0_count_frames
- seg1_start_frames
- seg1_end_frames
- seg1_count_frames
- overlap_frames
- total_duration_s
- report
Long video generation on consumer VRAM comes down to one ugly constraint: you can't sample 481 frames in one pass on a 12GB card, so you chop the video into segments, each seeded by the tail of the last. The two-segment planner is the piece that decides where the chop happens - before you've spent a single diffusion step.
It's dead simple, which is the point. You tell it the total video length, the frame rate, and roughly how long you want each raw segment. It does the frame math - including the overlap - and outputs every segment boundary as plain integers you can wire straight into LTX latent builders.
The inputs you actually set
- total_frames - the full video length. Default 481, which is ~20 seconds at 24fps.
- fps - for the duration math. Default 24.
- first_segment_raw_frames (default 241) and second_segment_raw_frames (default 249) - the raw lengths of each chunk. "Raw" is the key word: these are what you'd feed a single-shot LTX run, and the planner lets them overlap so continuity isn't broken.
Outputs
- seg0_start/end/count_frames and seg1_start/end/count_frames - exact frame boundaries for both segments.
- overlap_frames - how many frames the two segments share (computed as segment1-count + segment2-count − total, floored at 0).
- total_duration_s - total_frames ÷ fps, handy for audio sync.
- report - a human-readable breakdown you can log or pipe to a text preview.
The defaults are worth a second look: 241 + 249 − 481 = 9 overlap frames, which is the classic LTX continuity overlap so segment 2's first frames reference segment 1's tail. If you're just starting, keep the defaults and change only total_frames - the geometry is already sane.
Install & usage
Ships with IAMCCS-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
or via Manager (search "IAMCCS"), then restart. No models, no extra deps. It's pure integer math.
Wire the segment frames into your two-pass LTX graph: segment 0 runs with seg0_*, then segment 1 is conditioned on the overlap from segment 0's tail. Because this planner only outputs numbers, you still need the actual sampler/VHS/VHS-LTX machinery around it - think of it as the "shot list" for the two takes. One thing people trip on: it plans for exactly two segments and expects you to feed the second the tail of the first. If you set total_frames larger than both raw segments combined, the gap is not auto-filled - there's a three-segment sibling (IAMCCS_ThreeSegmentPlanner) for longer runs.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| total_frames | INT | 4811–10000000 | — |
| fps | FLOAT | 24.000.001–240 | — |
| first_segment_raw_frames | INT | 2411–1000000 | — |
| second_segment_raw_frames | INT | 2491–1000000 | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| seg0_start_frames | INT | — |
| seg0_end_frames | INT | — |
| seg0_count_frames | INT | — |
| seg1_start_frames | INT | — |
| seg1_end_frames | INT | — |
| seg1_count_frames | INT | — |
| overlap_frames | INT | — |
| total_duration_s | FLOAT | — |
| report | STRING | — |