ComfyUI Node
Video Pieces π
Plans a long clip as pieces for a video model that makes a few seconds at a time, for a loop that makes one piece each time round. Each piece repeats the last frames of the piece before, so the two join without a jump, and a new piece starts at every cut between shots, so no piece mixes two shots. Wire pieces into Start Loop's max iteration (For, step 1) and the loop's iteration index into piece.
Video Pieces π
- images
- clip_settings
- pieces
- start
- frames
- shared
- continues
- longest_start
- longest_frames
βpiece_frames192βΊ
βshared_frames39βΊ
βsplit_at_cutstrueβΊ
βscene_cut_threshold0.35βΊ
βpieceββΊ
Categoryπ AusBoss/Video
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| piece_frames | INT | 1921β100000 | Frames in each piece: as many as your video model makes at once. 192 is 8 s at 24 fps. |
| shared_frames | INT | 390β99999 | Frames each piece repeats from the end of the piece before, so the two join without a jump. Never shared across a cut. Keep it below Piece. |
| split_at_cuts | BOOLEAN | true | on: a new piece starts at every cut between shots, so no piece mixes two shots. off: a new piece every Piece - Shared frames, cuts or not. |
| scene_cut_threshold | FLOAT | 0.350β1 | How big a change between two frames counts as a cut: a change that jumps out from the frames around it, or any change above this number. The same finder as Frame Interpolate. |
| imagesopt | IMAGE | Your whole clip, every frame. Or wire clip_settings instead. | |
| clip_settingsopt | AUSBOSS_CLIP_SETTINGS | The clip_settings of the Video Crop + Rotate + Pad -> Clip that loads your clip. The node then reads the clip itself, small, so a long clip never has to sit in memory. | |
| pieceopt | INT | Which piece, counting from 0: wire the loop's iteration index here. Not wired: the first piece. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| pieces | INT | How many pieces the clip makes: wire it into Start Loop's max iteration. |
| start | INT | The first frame of this piece, counting from 0. |
| frames | INT | Frames in this piece. |
| shared | INT | Frames this piece repeats from the end of the piece before: 0 for the first piece and right after a cut. |
| continues | BOOLEAN | True when this piece carries on from the piece before (Shared above 0): wire it to Follow Video Latent's hold. |
| longest_start | INT | The first frame of the clip's longest shot, the same for every piece. A clip that opens on someone else mostly does so briefly, so this is where to look for the person the clip is about. |
| longest_frames | INT | Frames in the longest shot, at most one piece. |