🎬 MiniMax Video Chunk Slicer (长视频智能切片器)
Redraw one 5-second bite, not the whole film
- images
- audio
- optional_first_frame_ref
- chunk_images
- chunk_audio
- slice_context
- video_info
- timeline_preview
- fps
- frame_count
- slice_info
- prev_last_frame
- prev_ref_frames
MiniMax H3 generates 4–15 second clips. Your footage is four minutes long. That gap is what this node exists to close - and the naive way to close it, one IMAGE batch of 6,000 frames from VHS_LoadVideo, is why people abandon long-video work before finishing the first shot.
MiniMax Video Chunk Slicer (长视频智能切片器) is the front half of this pack's long-video pipeline. It pulls one chunk of frames plus the matching audio slice out of a video file, so you can hand that chunk to an H3 redraw chain without loading the rest of the movie. The back half, putting the edited chunk back, is MiniMax Video Patch Reassembler.
Why you'd reach for it
Long video used to mean last-frame-to-first-frame chaining: generate clip one, feed its final frame into clip two. It works, and it drifts, because every hop re-encodes. H3 makes generation continuity much better - masked-AV prefix continuation is this pack's headline - but the slicer solves the other job, where you already have footage and want it re-rendered or repaired in H3-sized pieces.
It also closes the loop from the editing side: besides the chunk, it emits the previous chunk's last frame and its final N frames, and once an earlier chunk has been patched back in, those come from the edited result. Wire them into an image-to-video first-frame or prefix-context port and chunk 8 starts from what chunk 7 actually looks like now.
Worth knowing first: H3's open weights are licence-geofenced out of the US, EU, UK and Korea, so local use isn't licensed there. That's a fact about the model, not this node.
How it works
No secret decoder. The node shells out to FFmpeg with a seek position, an fps filter, an optional bicubic scale and -vframes <chunk_length>, pipes raw RGB24 back, and reshapes it into a float tensor. Audio is sliced on the same time window, so picture and sound stay sample-aligned.
That's why the low-memory claim holds: only the chunk you asked for is decoded. Wire images and audio in and it chunks a tensor instead.
The inputs that matter
video_file- a dropdown of files found by walking ComfyUI'sinput/directory (absolute paths work too). Empty install, empty list: it saysnone.project_name- the state key. Use the same string here and in the Reassembler, or you've built two timelines that never meet.chunk_length/chunk_index- frames per chunk, and which one. Default124(~5.16s at 24fps); the preset capsules offer 39, 90, 124 and 141, the H3-friendly lengths. Resolution presets: 1344x768 (the author's default), 720p, 1080p, or 0/0 for source resolution.force_fps- 24 unless you wire something into the optionalfpsinput, which wins when connected.slice_mode-Auto Chunk Grid(chunk_index × chunk_length),Custom Range(usescustom_start_frame/custom_end_frame), orNext Unedited, which jumps to the first unpatched chunk. That last one earns its keep halfway through a project.auto_advance- setNext Chunkand the frontend widget bumpschunk_indexafter each run. Queue the workflow N times for an unattended slicing loop.
Then prev_ref_frames_count (default 16) sets how many frames prev_ref_frames carries, first_chunk_ref_mode decides what it holds on chunk 0 (current chunk's first frame, or black), and optional_first_frame_ref supplies your own starting image for that first chunk.
Outputs
chunk_images and chunk_audio go to your edit chain. slice_context goes to the Reassembler and nowhere else - it's a private type, so don't route it into a VHS node. video_info is a VHS-compatible specs dict for VHS_VideoInfo; timeline_preview is a 768x128 progress card for PreviewImage; slice_info is that status as text, edited-vs-original included. Continuity comes out as prev_last_frame (one frame, for an I2V-style port) and prev_ref_frames (N frames, for a video or prefix-context port).
Install
ComfyUI Manager → search ComfyUI-MiniMaxH3-PrefixStream, or:
cd ComfyUI/custom_nodes
git clone https://github.com/knoic/ComfyUI-MiniMaxH3-PrefixStream.git
cd ComfyUI-MiniMaxH3-PrefixStream
pip install -r requirements.txt
That file is just torch, safetensors and pillow - all present already. Restart, then Ctrl+F5: the pack ships frontend widgets, and a stale cache shows a bare node with none of its timeline UI.
Where people get burned
FFmpeg isn't in requirements.txt but it is required. The node calls ffmpeg and ffprobe as system binaries, checking PATH plus a couple of hardcoded Windows paths, so a missing install gives ffmpeg executable not found in PATH or environment from a pack whose dependency list looks trivial. Install it (sudo apt install ffmpeg, brew install ffmpeg, winget install Gyan.FFmpeg) and restart ComfyUI so it inherits the new PATH. Same story for none in the dropdown: the file isn't in ComfyUI/input/, so copy it there or paste an absolute path.
slice_context isn't a general socket. People wire it into a sampler LATENT input and get a type error.
Keep project_name stable. Change it mid-project and the slicer starts a fresh timeline while the reassembler reports on the old one. Session files live under output/minimax_h3_bins/<project>/ - also where you delete a project and start clean.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| video_file | COMBO | 1 options: none | |
| project_name | STRING | Video_Edit_Project | — |
| chunk_length | INT | 12416–2048 | — |
| chunk_index | INT | 00–9999 | — |
| target_width | INT | 00–7680 | — |
| target_height | INT | 00–4320 | — |
| force_fps | FLOAT | 24.001–120 | — |
| slice_mode | COMBO | 3 options: Auto Chunk Grid (网格切分), Custom Range (自由区间), Next Unedited (自动下一未编辑段) | |
| custom_start_frame | INT | 00–999999 | — |
| custom_end_frame | INT | 1241–999999 | — |
| auto_advance | COMBO | None (手动控制) | 3 options: None (手动控制), Next Chunk (顺序下一段), Next Unedited (跳至下一未编辑) |
| prev_ref_frames_count | INT | 161–128 | — |
| first_chunk_ref_mode | COMBO | Current Chunk First Frame (当前片段首帧) | 2 options: Current Chunk First Frame (当前片段首帧), Black / Zero Frame (全黑空帧) |
| imagesopt | IMAGE | — | |
| audioopt | AUDIO | — | |
| fpsopt | FLOAT | — | |
| optional_first_frame_refopt | IMAGE | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| chunk_images | IMAGE | — |
| chunk_audio | AUDIO | — |
| slice_context | SLICE_CONTEXT | — |
| video_info | VHS_VIDEOINFO | — |
| timeline_preview | IMAGE | — |
| fps | FLOAT | — |
| frame_count | INT | — |
| slice_info | STRING | — |
| prev_last_frame | IMAGE | — |
| prev_ref_frames | IMAGE | — |