📐 S42 CutFlow Video Segment Prep
Slicing long footage into valid chunks
- video
- segment
- first_frame
- last_frame
- segment_count
- frame_count
- info
LTX 2.3 is the current mainstream open video generator, and it has two hard rules: width and height divisible by 32, and a frame count that's 8n + 1 (9, 17, 25 … 121, 257, 513). It also has a practical single-pass ceiling of roughly ten to twenty seconds. Try to feed it a minute of video and it fails. S42CF_VideoSegmentPrep is the CutFlow bridge node that turns "too long for LTX" into "a handful of individually valid clips" with the overlap you need to stitch them back together seamlessly.
It's from the LTX 2.3 Bridge section of the pack - the author calls this the "long-form segmented generation" workflow, and it's genuinely useful if you're extending a video beyond one pass.
How it works
This is a deterministic frame slicer, not a model. It walks your video from the start, cutting segments of segment_frames frames, then steps forward by segment_frames - overlap_frames for the next one. Because the start of segment N+1 overlaps the end of segment N, you can stitch the regenerated segments and the seams land in shared territory instead of at hard cut points.
For each segment it also hands you the first and last frames - which is exactly what LTX 2.3's First-Last-Frame-to-Video (FLF2V) guide conditioning wants, ready to feed straight into LTXVAddGuide.
The inputs that matter
segment_frames- default 121 (about 5s at 24fps). This must be 8n+1; the widget steps by 8 to keep you legal. 121 for modest VRAM, 257 for more.overlap_frames- default 9. Larger overlap = smoother stitching, smaller = more of each segment is unique content.segment_index- which segment this node instance outputs (0-based). This is the awkward part: to process all segments you either clone the node and set a different index per branch, or re-run the workflow changing this one value.
Outputs
segment- the sliced frames for this index.first_frame/last_frame- the guide frames, sized to whatever you put in, ready forLTXVAddGuide.segment_countandframe_count- the former tells you how many indices exist; the latter is the current segment's length, useful for downstream nodes like the pack's Audio Cond Prep.
The full workflow from the README: VideoSegmentPrep → AudioCondPrep → LTXFrameCalc → LTXPostProcess → BackgroundPlate, with each segment run through LTX independently and stitched after.
Installing it
Standard pack install - ComfyUI Manager, search S42 CutFlow, or git clone https://github.com/GeekyGhost/S42-CutFlow into ComfyUI/custom_nodes/, install requirements, restart. No model downloads for this node; the heavy lifting is all your LTX pipeline.
Gotchas
Two things bite people. First, feed segment_frames a valid 8n+1 count or LTX will reject the segment - the tooltip saves you here, but the node itself won't re-validate. Second, this only outputs one segment per node; the moment you have a 3-minute source and you're cloning nodes for every index, consider whether an external splitter plus a loop would be less graph spaghetti. And one honest note: it's a plain tensor slicer with overlap - it doesn't do the stitching for you. You still have to reassemble the regenerated segments.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| video | IMAGE | Long video to split into LTX-compatible segments. | |
| segment_frames | INT | 1219–513 | Frames per segment. Must be 8n+1. 121=5s, 257=10.7s at 24fps. |
| overlap_frames | INT | 91–33 | Overlap between segments for smooth transitions. Should be 8n+1. |
| segment_index | INT | 00–999 | Which segment to output (0-based). |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| segment | IMAGE | — |
| first_frame | IMAGE | — |
| last_frame | IMAGE | — |
| segment_count | INT | — |
| frame_count | INT | — |
| info | STRING | — |