沐阳 H3 · 粗剪首尾帧(内部)
In/out points on a timeline, turned into H3 constraints
- 首帧约束
- 尾帧约束
- 入点MotionContext
- 入点声音
- 出点MotionContext
- 出点声音
Most long-video tools make you think in segments: segment 1 continues into segment 2, and so on, and the fact that there's an edit at the end is a thing you deal with afterwards in a video editor. This pack's rough-cut feature inverts that. You mark an in point and an out point on a timeline, and the generation fills the slot - start matching what comes before, end matching what comes after.
H3RoughCutBoundaryFrames is the node that reads those marks and turns them into constraints the model can use.
The two flavours of boundary
A cut has two possible jobs. Either the new segment must start on a specific frame - a hard anchor, the way image-to-video pins frame zero - or it must start in a specific motion state, which is different: not "begin with this exact picture" but "begin moving the way this footage was moving." H3's context windows can do the second, and doing it well is most of what this pack is about.
Four independent booleans decide what gets loaded:
load_first- a single frame at the timeline's in point, as首帧约束(start-frame constraint).load_last- a single frame at the out point, as尾帧约束.load_head_motion- a preceding MotionContext window at the in point, plus its audio.load_tail_motion- a following MotionContext window at the out point, plus its audio.
load_head_motion/load_tail_motion are the interesting pair, and they hold the seam advice this pack gives over and over: a cut is described by the next shot's prompt, not by a black frame or a flash. In this mode the boundary is a temporal anchor - a run of real frames the new generation can continue from - which is what stops the join from looking like two clips glued together.
context_frames (INT, 5-56, default 22) sets the window length for the motion loads. Stick to 5, 22, 39 or 56 - those are the four lengths that land on whole H3 latent steps, and 22 (about 0.92 seconds) is the pack's recommended starting point. Anything else is a number H3 will have to round, and rounding on a continuity window is how you get a seam you can see.
Six outputs, and what they're for
| Output | Type | Wire it to |
|---|---|---|
| 首帧约束 | IMAGE | H3's keyframe/first-frame conditioning |
| 尾帧约束 | IMAGE | last-frame keyframe conditioning |
| 入点MotionContext | IMAGE | the motion-context / continuity path |
| 入点声音 | AUDIO | the audio half of that same window |
| 出点MotionContext | IMAGE | the reverse - generation running toward a target |
| 出点声音 | AUDIO | its soundtrack |
The audio outputs are the part people forget. H3 generates picture and sound in one pass, so a motion context that carries only frames is asking the model to re-derive the room tone and any dialogue from nothing. Carrying the audio window across the boundary keeps the join from having an audible step in it. This is the same reasoning behind the pack's H3AudioSeam and its seam blend.
Anything you don't load comes back as an empty placeholder rather than erroring, so it's safe to have all four toggles off - you just get nothing usable downstream.
The input
project_json (STRING, forced input) - the rough-cut project. It's the pack's own frame-level timeline format: integer frames, tracks, clips, and a selection with in_frame/out_frame plus start_mode/end_mode. Authoritative unit is the frame, which is the right call for video and the reason the node can hand out exact constraints rather than approximate ones.
Valid JSON or you get a clear error. It's a forced input, so it has to be wired - you can't paste a project into the widget.
Category and install
沐阳 H3/导演台/内部. The Director's rough-cut flow wires it: you set the in/out points in the timeline UI, and this node pulls the constraint material. Its siblings in that flow are H3DirectorPlanLimit (fitting the storyboard plan to the slot's duration) and the rough-cut save node that trims the result to the selection and writes it back to the timeline.
cd ComfyUI/custom_nodes
git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang
Restart ComfyUI and hard-refresh the browser; look under 沐阳 H3/导演台/内部, or search "ComfyUI MiniMax H3 Myang" in ComfyUI Manager. No Python dependencies - the pack's pyproject.toml declares an empty list, and the rough-cut module is deliberately pure: specification, validation, boundary lookup and overwrite editing, with no UI, HTTP or torch in it.
The usual weights rule applies: H3 diffusion model, Qwen text encoder, video VAE, audio VAE, all yours to supply.
The realistic expectation
Boundary constraints improve a join; they don't guarantee one. The pack is honest that long chains accumulate losses in detail, timbre, brightness and saturation, and that a clean seam doesn't mean content quality holds steady down the chain. Treat in/out constraints as the thing that makes an edit point plausible - the role last-frame-to-first-frame chaining has played in every video model since the 81-frame ceiling era - and check the join by eye. The long-video write-up is the long version of that lesson.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| project_json | STRING | — | |
| load_first | BOOLEAN | false | — |
| load_last | BOOLEAN | false | — |
| load_head_motion | BOOLEAN | false | — |
| load_tail_motion | BOOLEAN | false | — |
| context_frames | INT | 225–56 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| 首帧约束 | IMAGE | — |
| 尾帧约束 | IMAGE | — |
| 入点MotionContext | IMAGE | — |
| 入点声音 | AUDIO | — |
| 出点MotionContext | IMAGE | — |
| 出点声音 | AUDIO | — |