Nodes/ComfyUI-MiniMaxH3-Myang/沐阳 H3 · 锚点同步裁剪
ComfyUI Node

沐阳 H3 · 锚点同步裁剪

The cleanup step that keeps anchored video the right length

By civilcoco·Created 3 days ago·Updated 3 days ago· 1
沐阳 H3 · 锚点同步裁剪
  • images
  • audio
  • images
  • audio
trim_frames0
fps24.00

Nobody talks about the trim node, and every long video falls apart without it. 沐阳 H3 · 锚点同步裁剪 (H3AnchorTrim) is the bookkeeping half of the anchor system: 沐阳 H3 · 段间多关键帧 (H3AnchorContext) pins the previous segment's tail into the head of the new one, which makes that new segment temporarily longer than its real duration - and this node cuts the borrowed frames back out again, in sync.

The subtle part is the "in sync." Video runs on a 24fps timeline in this pack; H3's audio sits on its own 40Hz grid. If you trimmed the picture and left the audio alone, every subsequent segment would drift a few hundred milliseconds further from its sound with each link in the chain. So the node trims the first trim_frames off the image batch and, at the same time, cuts the same duration out of the audio head - trim_frames / fps * sample_rate worth of samples. Then it goes one step further and pads or truncates the audio tail so the delivered sound exactly matches the delivered picture length. That "trim to delivery duration" step is what keeps the final assembly from being short or glitchy at the seam.

Inputs

  • images - the rendered segment, including the anchor frames.
  • trim_frames - how many frames to cut from the head. This is meant to be wired from H3AnchorContext's trim_frames output; typing it by hand is how you get off-by-context_length bugs.
  • audio (optional) - the segment's soundtrack. If you leave it disconnected you get video-only trimming, which is fine for a picture-only check and wrong for a real seam.
  • fps (optional) - 24.0 default; only touch it if your media is genuinely not 24fps.

Outputs: images and audio, both trimmed and ready to concatenate onto the previous segment.

Install and the workflow rhythm

Pack install is the usual: ComfyUI Manager search "ComfyUI-MiniMaxH3-Myang", or git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang into custom_nodes, restart. No extra Python dependencies.

Where people get burned: passing the wrong trim count (wire it, don't type it), feeding audio without having trimmed the video (sync drift), and trimming more frames than the segment has - the node raises a clear error for that, which at least means the failure is loud rather than silent. One practical tip from the README's own workflow: when you're testing, don't trust a seam until you've checked both the picture and the audio at the join - a video seam can look clean while the audio is quietly out of phase. And remember the H3 weights themselves carry that territory-restricted community license (US/EU/UK/South Korea excluded) - worth checking before you start a long project on it.

Category沐阳 H3

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
trim_framesINT00–4096
audiooptAUDIO
fpsoptFLOAT24.001–240

Outputs (2)

NameTypeDescription
imagesIMAGE
audioAUDIO