🎯 S42 CutFlow Guide Frame Prep
Feed LTX 2.3 the Frames It Actually Wants
- source
- first_frame
- last_frame
- guide_indices
- info
LTX 2.3 is a first-frame/last-frame model at heart - it generates video conditioned on the frames you give it, which is why the FLF2V (First-Last-Frame-to-Video) workflow exists. The problem: extracting the right frames and resizing them to the exact latent dimensions is fiddly, and if the numbers are wrong, the model fails or produces garbage. S42CF_GuideFramePrep automates the extraction and resizing so the output is ready to wire into LTX's guide conditioning nodes.
What it does
Feed it a source video (or even a batch of stills) and it pulls the guide frames according to a mode, resizes them to your target dimensions, and hands them back on dedicated outputs:
first_last(default) - first + last frame, the standard FLF2V setup.first_only- just the first frame, the simpler image-to-video case.last_only- just the last frame.keyframes- extract at indices fromkeyframe_indices(default0, -1, where negatives count from the end).evenly_spaced- N frames evenly distributed across the clip (num_guides, default 3). For multi-guide workflows where you want consistent temporal sampling.
Then target_width (default 768) and target_height (default 512) resize the frames to match your LTX empty latent. The outputs are first_frame, last_frame, plus guide_indices (a string of what was extracted, handy for debugging) and info. Wire the frame outputs into LTX's LTXVAddGuide / LTXVPreprocess nodes.
The rules you're actually trying to hit
LTX 2.3 has hard resolution constraints, and they're not suggestions - off-grid values fail rather than round. Two of them matter here:
- Frame count must follow 8n+1 (9, 17, 25, 33… 121, 129…). That's the generation side, handled by the pack's LTX Frame Calculator, not this node.
- Width and height must be divisible by 32. If your empty latent is 768×512, both numbers clear that test. The defaults exist precisely because they're common valid LTX resolutions.
The 2.3-era reality: guide conditioning is powerful but leaky - the guide frames themselves can bleed into the last couple of frames of output. That's why the pack also ships an LTX Post-Process node to crop those artifacts (it matches the native LTXVCropGuides behavior). Plan on trimming 1–2 frames off the end of LTX output before your video enters the edit chain.
Install
ComfyUI Manager → search "S42 CutFlow" → Install → restart. Or:
cd ComfyUI/custom_nodes/
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt
Restart fully; console prints [S42 CutFlow] Loaded 53 total nodes. GuideFramePrep itself is CPU-only (frame slicing + resize). The only mandatory pack dependency is OpenCV (opencv-python-headless in requirements.txt; opencv-python in the README's troubleshooting - either fixes "No module named 'cv2'").
Pack note: Geeky Ghost is building S42 CutFlow to groom nodes for LTX Desktop, so the LTX bridge nodes track the model's changes closely. When LTX updates, check this node's changelog before assuming your old workflow still hits the right dimensions.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| source | IMAGE | Source video or image batch. Can be AI-generated frames, photos, or existing video. | |
| mode | COMBO | first_last | Which frames to extract as LTX guide frames: 'first_last' = first + last frame (standard FLF2V workflow). 'first_only' = just the first frame (simpler I2V). 'last_only' = just the last frame. 'keyframes' = extract at specified indices. 'evenly_spaced' = N frames evenly distributed. |
| keyframe_indices | STRING | 0, -1 | Comma-separated frame indices for 'keyframes' mode. Negative indices count from end. E.g. '0, 40, -1'. |
| num_guides | INT | 32–10 | Number of guide frames for 'evenly_spaced' mode. |
| target_width | INT | 768256–2048 | Output width. LTX 2.3 supports up to 1920. Common: 768, 1024, 1280, 1920. |
| target_height | INT | 512256–2048 | Output height. Must match your LTX empty latent dimensions. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| first_frame | IMAGE | — |
| last_frame | IMAGE | — |
| guide_indices | STRING | — |
| info | STRING | — |