Three Segment Planner (stable 3SEG)
Three-segment frame math for LTX runs that outgrow two chunks
- seg0_start_frames
- seg0_end_frames
- seg0_count_frames
- seg1_start_frames
- seg1_end_frames
- seg1_count_frames
- seg2_start_frames
- seg2_end_frames
- seg2_count_frames
- overlap_frames
- unique_segment_frames
- total_duration_s
- report
When a video won't fit in two LTX segments, you don't need a cleverer model - you need a third slice and the math to lay it out. Three Segment Planner is the bigger sibling of IAMCCS's two-segment planner: same idea, one more chunk, and a couple of extra safety numbers to keep your segments honest.
It's a pure planning node. No sampler, no VAE, no pixels. You declare the total length and how long each raw segment should be, and it returns exact start/end/count frames for all three segments plus the overlap structure. Handy whenever your target exceeds ~20 seconds on a consumer GPU - LTX 2.x runs get memory-hungry fast, and the pack's own long-video backends lean on this exact breakdown.
Inputs
- total_frames - full video length (default 721, ~30s at 24fps).
- fps - for duration output.
- first_segment_raw_frames (default 241) and continuation_raw_frames (default 249) - segment 0's length, then the same length reused for both continuation segments 1 and 2. Notice there's only one continuation size: the planner assumes your later chunks are identical, which is usually right for a loop.
Outputs
- seg0_, seg1_, seg2_* start/end/count triples.
- overlap_frames - shared frames between segments.
- unique_segment_frames - the distinct frames actually contributed (total minus overlaps), handy for sanity-checking you're not re-sampling the same content.
- total_duration_s and report.
With the defaults, the geometry works out so each continuation overlaps the previous tail and unique_segment_frames lands close to total_frames - that's the "stable 3SEG" in the display name doing its thing. Wire the triples into three sequential LTX passes where each pass seeds on the previous segment's tail.
Install
Ships in IAMCCS-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
or via ComfyUI Manager (search "IAMCCS"), restart ComfyUI. No models, no deps - integer math only.
The one thing to respect: continuation segments all use continuation_raw_frames, so if your video needs a different final segment (e.g. a hard outro), you'll be overriding a boundary by hand. The planner assumes a steady rhythm - treat any irregular ending as a manual adjustment after you see the numbers. And like its sibling, this node doesn't run a sampler; pair it with your LTX sampler chain and make sure the actual chunk lengths you feed the model match what the planner computed, or you'll fight drift that this node could have prevented.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| total_frames | INT | 7211–10000000 | — |
| fps | FLOAT | 24.000.001–240 | — |
| first_segment_raw_frames | INT | 2411–1000000 | — |
| continuation_raw_frames | INT | 2491–1000000 | — |
Outputs (13)
| 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 | — |
| seg2_start_frames | INT | — |
| seg2_end_frames | INT | — |
| seg2_count_frames | INT | — |
| overlap_frames | INT | — |
| unique_segment_frames | INT | — |
| total_duration_s | FLOAT | — |
| report | STRING | — |