Segment Planner Linked (shared inputs)
One set of segment settings, a hundred copies of the planner — this is how
- total_frames
- unique_segment_frames
- first_segment_raw_frames
- continuation_raw_frames
- estimated_segments
- continuation_loops
- last_segment_unique_frames
- report
- segment_index_out
- current_segment_raw_frames
- current_segment_unique_frames
- current_segment_start_frames
- current_segment_end_frames
- current_remaining_frames_after
- current_segment_start_s
- current_segment_end_s
- current_segment_report
- fps_out
- recommended_overlap_frames
- recommended_audio_left_context_s
- recommended_extension_preset
- effective_planning_mode
- planning_profile_report
IAMCCS_SegmentPlannerLinked is the "don't repeat yourself" version of the IAMCCS_SegmentPlanner. In a long LTX-2 extension workflow you often end up with the planner duplicated all over the graph - one for the first segment, one per continuation, one for the last, maybe one inside each SuperNode. With the plain planner, that's a lot of widgets to keep in sync, and one stale overlap value three copies in means a seam you'll chase for an afternoon.
This variant forces its planning settings through inputs instead of letting them be hand-edited widgets. Feed it from a single shared source - usually the pack's IAMCCS_SegmentPlannerSettings node - and every copy of the planner agrees on segment_duration_s, planning_mode, segment_preset, and overlap_frames because they all read the same wires. Change the setting once and the whole graph re-plans.
How it works
Under the hood it's the exact same plan() math as the base planner - song duration → total frames, 8n+1 LTX rounding via ltx_round_mode, first/continuation raw frame split, per-index current-segment numbers. The only real difference is plumbing: segment_duration_s, planning_mode_in, segment_preset_in, overlap_frames_in are all forceInput, so they're link-only. There's also an optional ltx_round_mode_in if you want to push the rounding mode too; leave it unconnected and the widget value wins.
Inputs and outputs
Set song_duration_s and fps like normal, then link the four settings inputs from your shared SegmentPlannerSettings node (or anywhere - they're plain FLOAT/STRING/INT wires). segment_index drives which segment's numbers you get this iteration.
Outputs are identical to the base planner, and that's the point - drop it in place of a SegmentPlanner and nothing downstream changes:
total_frames,estimated_segments,continuation_loops,first_segment_raw_frames,continuation_raw_frames,last_segment_unique_frames- current-segment set:
current_segment_raw_frames,current_segment_start_frames,current_segment_end_frames,current_segment_start_s,current_segment_end_s,current_remaining_frames_after,current_segment_report - recommendation outputs:
recommended_overlap_frames,recommended_audio_left_context_s,recommended_extension_preset
Wire current_segment_raw_frames into your sampler's length and the range nodes, and current_segment_start_s/_end_s into anything that needs to know where in the song you are.
Installing
Same pack as everything else: ComfyUI Manager → search "IAMCCS", or
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
then restart. No extra models or pip installs for this node - it's pure arithmetic. The LTX-2 model and VAEs that actually generate the video are the heavy part, and they're on you.
Gotchas
The biggest one is a wiring trap rather than a math trap: if you link planning_mode_in and segment_preset_in from a settings node but leave segment_duration_s on its widget, you can accidentally get preset-driven durations that contradict the duration you think you set. When in doubt, link all four from the settings node and let it own the values - that's the workflow this node was built for. And remember segment_index still needs to advance each loop iteration, or every segment gets the same start frame.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| song_duration_s | FLOAT | 180.000.01–36000 | — |
| fps | FLOAT | 24.000.001–240 | — |
| segment_duration_s | FLOAT | 10.000.01–3600 | — |
| planning_mode_in | STRING | manual_segment_seconds | — |
| segment_preset_in | STRING | 10sec | — |
| overlap_frames_in | INT | 90–4096 | — |
| ltx_round_mode | COMBO | up | 3 options: up, nearest, down |
| segment_index | INT | 00–100000 | — |
| ltx_round_mode_inopt | STRING | — |
Outputs (23)
| Name | Type | Description |
|---|---|---|
| total_frames | INT | — |
| unique_segment_frames | INT | — |
| first_segment_raw_frames | INT | — |
| continuation_raw_frames | INT | — |
| estimated_segments | INT | — |
| continuation_loops | INT | — |
| last_segment_unique_frames | INT | — |
| report | STRING | — |
| segment_index_out | INT | — |
| current_segment_raw_frames | INT | — |
| current_segment_unique_frames | INT | — |
| current_segment_start_frames | INT | — |
| current_segment_end_frames | INT | — |
| current_remaining_frames_after | INT | — |
| current_segment_start_s | FLOAT | — |
| current_segment_end_s | FLOAT | — |
| current_segment_report | STRING | — |
| fps_out | FLOAT | — |
| recommended_overlap_frames | INT | — |
| recommended_audio_left_context_s | FLOAT | — |
| recommended_extension_preset | STRING | — |
| effective_planning_mode | STRING | — |
| planning_profile_report | STRING | — |