沐阳 H3 · 粗剪覆盖写入(内部)
There's a write-back switch on H3RoughCutSave, and it starts switched off
- images
- audio
- images
- audio
- project_json
H3RoughCutSave is the last thing that runs in the Director's rough-cut loop - it renders the selection you marked on the timeline to an MP4 and writes that clip back onto the timeline. It is also the node that most often looks broken when it isn't, because its writeback_enabled input defaults to off and it fails closed.
That guard is deliberate. Expanded graphs created before the guard existed don't carry the value at all, so they get pass-through rather than a surprise write into a project they didn't come from. Only the current Director explicitly authorises a write-back by sending True. If you hand-wired a graph, copied one, or reloaded an old one and nothing landed on your timeline, check this first - that's the whole mystery.
What it does with your render
MiniMax H3 generates on a fixed 24fps, 17k+5-frame grid, so the length the model can actually produce almost never matches your selection exactly. This node is the reconciliation.
It reads the selection out of project_json, converts the in/out range to a duration in seconds, and multiplies by fps to get target_frames. If the render is longer, it crops. If it's shorter, it pads by repeating the last frame - silently, by design, which is why an over-short render gives you one frozen frame at the end rather than an error. Audio is then fitted to the same duration (sample_rate off the audio object, defaulting to 32000 when it's missing) so picture and sound end together.
The fitted pair goes through ComfyUI's VideoFromComponents at 8-bit and is saved as H.264 MP4 under your filename_prefix, default video/H3_导演台_粗剪, in the output folder. It then writes the result's real width and height back into the project's settings before replacing the selection, which matters more than it sounds: without it, a portrait generation written into an empty project would later export onto the legacy 1920x1080 canvas. Clips crossing the selection boundary are split at the boundary, and nothing outside the selection shifts - there's no ripple edit.
The commit is announced over ComfyUI's websocket as a myh3_roughcut_commit event carrying the project JSON, the video reference, target_frames and fps, plus a roughcut_project payload in the node's UI field. The event send is wrapped in a try/except on purpose: the file is already on disk by then, and a closed browser tab must not turn a successful render into a failed execution.
Inputs and outputs worth knowing
The four you actually care about, in order of how much they'll bite you:
project_json- a forced input string, so it comes off a wire, not typed in. It's the rough-cut project (format: myang.roughcutplus a version check), and a blank value normalises to an empty project with a zero-length selection. The frame target bottoms out at one frame there, so wire it properly or you'll save a still.filename_prefix- where the rendered MP4 lands. Change it per client or per cut if you don't want every job in the same folder.writeback_enabled- the optional boolean, defaultFalse. Nothing is written back unless it's exactlyTrue.owner_id- identifies which project owner the frontend commit event belongs to. Leave it empty unless you're running the Editor yourself.
The outputs are images, audio and project_json, and they're pass-throughs - but note they're the fitted versions, already cropped or padded to the selection length. Chain downstream and you get exactly selection-length AV, not the raw sampler output.
Installing it
ComfyUI Manager, search the pack title, or:
cd ComfyUI/custom_nodes
git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang.git
Restart ComfyUI and hard-refresh the browser. The pack declares no Python dependencies of its own, so there's nothing to pip for the rough-cut path - but the node imports comfy_api.latest, so you need the recent ComfyUI build that has the official H3 nodes anyway. Bring your own H3 diffusion model, Qwen text encoder, video VAE and audio VAE; nothing is distributed with the repo.
Where people get burned
An empty images tensor raises 导演台没有生成可写入粗剪时间轴的画面. If write-back is off you get pass-through and no file - check the boolean before you go digging in the logs. And the practical one: because the node pads rather than complains, watch the frame count in the commit event against your selection. A wrong fps here doesn't error either, it just quietly computes the wrong target and trims your take to a length you didn't ask for.
One more: it's filed under 内部 because the Director wires it for you. You only meet this node if you're building the graph by hand.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| audio | AUDIO | — | |
| fps | FLOAT | 24.001–240 | — |
| project_json | STRING | — | |
| filename_prefix | STRING | video/H3_导演台_粗剪 | — |
| owner_id | STRING | — | |
| writeback_enabledopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| audio | AUDIO | — |
| project_json | STRING | — |