MiniMax H3 LanPaint AV Composite / 原片音画回贴 (Advanced)
Stitch the repair back onto the original — repaired pixels in, untouched sound everywhere else
- source_frames
- repaired_frames
- source_audio
- repaired_audio
- video_mask
- frames
- audio
- report_json
Local AV repair is a two-act play. Act one - the LanPaint Prepare node - encodes your footage and attaches the masks. Act two is this node: taking the repaired result from the LanPaint sampler and stitching it back onto the original so that only the parts you meant to touch actually changed. That "only the parts you meant to touch" is the entire value proposition, and it's the bit that separates AV repair from a full re-render. Inpainting's whole remaining case, as the community keeps rediscovering, is bit-identical unmasked pixels - nothing else offers it, and edit-everything models actively can't.
This node is the composite that enforces it across both modalities. Repaired pixels only inside the video mask, repaired audio only inside the declared intervals, original soundtrack everywhere else. If you've ever watched an "inpaint" that subtly shifted the whole frame, you know why this discipline matters.
How it works
You feed it the pair of inputs on each side - source_frames/source_audio (the untouched original) and repaired_frames/repaired_audio (what the LanPaint sampler produced) - plus the optional video_mask and the audio_intervals JSON string that says which seconds of audio are actually new. It blends:
- Video: repaired pixels only inside
video_mask, withvideo_blend_pixels(default 11) controlling the feather at the mask edge - that's your seam killer. Too small and you see the boundary; too large and the repair bleeds into clean territory. - Audio: repaired audio replaces the original only inside the
audio_intervalswindows, withaudio_crossfade_seconds(default 0.02) for the joins so you don't get clicks at the boundaries.
The output is a composited frames batch plus a composited audio track, ready for a standard save node. Same joint-AV discipline as the rest of the pack: the two clocks get treated separately and re-synced rather than mashed.
The inputs that matter
video_mask- without it, there's no definition of "repaired region" for the video side. It's optional in the schema but in practice it's the whole point.audio_intervals- same JSON shape as Prepare:[{"start":1.2,"end":2.0}]. Only these windows use the repaired audio.video_blend_pixels(11) - the mask-edge feather width, odd numbers only (1–101). Start at the default and tune up only if you see seams.audio_crossfade_seconds(0.02) - tiny by default; you'll hear a click at an interval boundary before you see one, and this is the dial that fixes it.
Outputs
frames (IMAGE) and audio (AUDIO) go straight to your save/preview chain. report_json confirms which intervals were blended and how many pixels were touched - useful when the result sounds wrong and you need to know whether the node or your intervals are at fault.
Installing it
Pack-level install, same as Prepare: ComfyUI Manager → "MiniMax H3 Audio T8", or git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8 into ComfyUI/custom_nodes, restart. The scraed/LanPaint external sampler is required upstream (see the Prepare article), but this composite node itself has no extra dependencies - it's pure blending.
Common issues
The repaired audio leaks outside its window. Check audio_intervals syntax - a malformed JSON silently means "no declared intervals," and no intervals means no audio gets replaced (or everything does, depending on the default you started from). The report_json is your witness.
Visible seam at the mask edge. Raise video_blend_pixels in steps of 2. If it's already high and still visible, the mask itself is jagged - fix the mask before blaming the blend.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| source_frames | IMAGE | — | |
| repaired_frames | IMAGE | — | |
| source_audio | AUDIO | — | |
| repaired_audio | AUDIO | — | |
| audio_intervals | STRING | [] | — |
| video_blend_pixels | INT | 111–101 | — |
| audio_crossfade_seconds | FLOAT | 0.0200–1 | — |
| video_maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | — |
| audio | AUDIO | — |
| report_json | STRING | — |