SCAIL-2 Chunk Keyframe Extractor
Grab the exact frames SCAIL-2 needs at every chunk boundary
- video
- boundary_anchor_frames
- new_chunk_start_frames
- paired_keyframes
- contact_sheet
- summary
SCAIL-2's long-video workflow runs on a hidden assumption: your reference images line up with what the model is doing at each chunk boundary. The trouble is those boundaries are only decided after you've planned the segments, and eyeballing a timeline to find "frame 157" is exactly how you get references that don't match and faces that drift. The SCAIL-2 Chunk Keyframe Extractor pulls the exact frames that matter from a reference or action video, so you can build manually aligned reference images without guessing.
Feed it any video as video (a loaded IMAGE batch - your old driving video, a previously generated clip, whatever you're building references from). It has two modes. In planner_summary mode you connect the optional planner_summary string - the output of the SCAIL-2 Segment Planner - and it extracts frames at exactly the boundaries that planner resolved. In standard_long_video mode you skip the planner and it derives the chunk boundaries itself from the video length, max_chunk_frames, and overlap_frames. The second mode is handy when you don't have a plan yet and just want to know where the 81-frame windows land.
The outputs are where this node earns its keep. boundary_anchor_frames are the anchor frames the continued chunks actually reuse (the first frame, then each continued chunk's kept previous frame), and new_chunk_start_frames are the first frames each chunk newly owns. paired_keyframes gives you both, alternating boundary/start pairs at original resolution, in the same visual order as the browser sheet - this is the output to save when you want usable source images. contact_sheet is a labeled table image for preview only, and summary is JSON with zero-based indices, one-based frame numbers, chunk ranges, and the safe continued keep size.
That keep size is the arithmetic from the rest of the pack, and it's worth repeating once: max_chunk_frames is the full generation window including overlap. With 81 + 5, boundary anchors progress as 1, 81, 157, 233 - not 1, 81, 162 - because each continued chunk only keeps 76 new frames. If your reference image for chunk 3 was built around frame 162, it'll be off by half a second of footage. The extractor uses the same 4n+1 normalization and overlap math as the scheduler, so its numbers match what actually renders.
A few controls to know: include_final_anchor appends the very last frame of the video as a boundary anchor, boundary_anchor_mode picks whether the anchor is the overlap's last or first frame (default overlap_last_frame), and contact_sheet_columns / contact_sheet_thumbnail_width just set the preview layout. max_frames caps how many frames it will process from the video.
Install is the pack standard: ComfyUI Manager search for comfyui_scail2_multi_cond, or clone https://github.com/TTPlanetPig/comfyui_scail2_multi_cond into ComfyUI/custom_nodes and restart. No model downloads - this is pure frame math and image handling.
The usual workflow pairs this with the Keyframe Matrix Viewer: extractor's paired_keyframes and summary go in, you browse the labeled matrix, click through to each saved PNG, and build your aligned references from the frames SCAIL-2 will actually anchor on. It's the difference between references that match the motion at every boundary and references that are close-but-off, which in SCAIL-2 land is the difference between a continuous clip and a face that wanders between chunks.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| video | IMAGE | — | |
| mode | COMBO | planner_summary | 2 options: planner_summary, standard_long_video |
| max_chunk_frames | INT | 8117–81 | — |
| overlap_frames | INT | 50–33 | — |
| max_frames | INT | 00–100000 | — |
| include_final_anchor | BOOLEAN | false | — |
| contact_sheet_columns | INT | 41–12 | — |
| contact_sheet_thumbnail_width | INT | 25696–1024 | — |
| boundary_anchor_mode | COMBO | overlap_last_frame | 3 options: overlap_last_frame, overlap_first_frame, |
| planner_summaryopt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| boundary_anchor_frames | IMAGE | — |
| new_chunk_start_frames | IMAGE | — |
| paired_keyframes | IMAGE | — |
| contact_sheet | IMAGE | — |
| summary | STRING | — |