NeurIPS 2026

VideoMaMa++: Temporally Consistent Video Matting via Preserve-and-Refine Tokens

Sangbeom Lim1, Seoung Wug Oh2, Heeji Yoon3
Seungryong Kim3†, Joon-Young Lee2†

1Korea University  ·  2Adobe Research  ·  3KAIST AI
†Co-corresponding authors

Follow-up to VideoMaMa: Mask-Guided Video Matting via Generative Prior CVPR 2026

Video diffusion backbones can only process 6–24 frames at a time, so even ordinary videos are matted in chunks. When each chunk refines its coarse mask independently, neighbouring chunks settle on different refinements — flickering edges and jumps in transparency at every seam. VideoMaMa++ hands each chunk the matte the previous one already produced, so the result carries across the seam. Same footage, same instant, both models below.

Watch the edges: VideoMaMa flickers as each new chunk starts over, while VideoMaMa++ stays temporally consistent.

Output

Click any video to play/pause  ·  the dots switch clips

Abstract

Diffusion-based video matting has recently emerged as a leading approach, leveraging video diffusion priors from internet-scale pretraining to achieve strong zero-shot generalization from limited synthetic data. However, the heavy compute of these diffusion backbones limits inference to a short chunk of just 6–24 frames, so even ordinary videos span multiple chunks. Because each chunk is matted independently from coarse mask guidance, existing methods fail to maintain consistency across chunk boundaries, producing flickering edges and discontinuous transparency.

We address this with a mask-guided diffusion-matting framework built on two ideas. The RGB and mask conditioning are represented as separate token streams that interact through full spatio-temporal self-attention, letting the model adaptively combine fine RGB texture with coarse mask layout rather than committing to a fixed channel-wise fusion. On top of this, we propose a novel pair of learnable embeddings, the preserve token and the refine token, that act as a per-frame conditioning interface and enable a sliding-window inference scheme in which already-generated mattes are propagated across chunk boundaries for local temporal consistency, complemented by a globally shared reference anchor at every chunk to prevent error accumulation in long sequences without any additional training. Across standard video matting benchmarks and in-the-wild long footage, our framework outperforms prior diffusion-based methods in both fine-detail accuracy and temporal consistency, and uniquely maintains consistency across chunk boundaries on long videos.

Video

Method

VideoMaMa++ training and inference overview

Training (top): RGB frames are paired with either a binary mask or the ground-truth matte as guide input, encoded into separate token streams by a frozen VAE encoder, and tagged with a refine (R) or preserve (P) token; the DiT learns both modes jointly within one clip.
Inference (bottom): long videos are processed with a sliding window — overlap frames carry the previous chunk's matte under the preserve token, and a reference anchor is supplied to every chunk.

Guidance as tokens

RGB frames and the coarse mask enter the DiT as separate token streams, composed by full spatio-temporal self-attention instead of being fused by channel concatenation.

Preserve & refine tokens

Two learnable embeddings tag every frame: preserve — keep this matte as a reference; refine — turn this coarse mask into a fine matte consistent with the references.

Consistent long videos

Sliding-window inference propagates finished mattes across chunk boundaries, and a global reference anchor stops errors accumulating — with no additional training.

Built on Wan 2.1 (1.3B) adapted with LoRA (rank 512) · trained on 3-frame clips at 1024×1024 for about 2.5 days on 8×H100 · one denoising step at inference · RoPE lets the 3-frame training setup generalize to 6-frame chunks at test time.

Comparison vs VideoMaMa (Ours)

Drag the divider to sweep between a baseline (left) and VideoMaMa++ (right) on the same frame, at the same instant. Pick any clip, any baseline, and either the raw alpha matte or the greenscreen composite.

Output

Drag or tap the divider to move it  ·  tap the video to play/pause  ·  focus the divider and use ←→ for fine control

All methods side by side

9 in-the-wild clips, six methods, all players synchronized to the same timeline. Toggle methods on and off to compare any subset side by side.

Input

Methods

Predicted alpha matte

Greenscreen composite

Click any panel to play/pause  ·  Space play/pause  ·  ←→ change clip  ·  R restart

Quantitative results

Video matting benchmarks at 1920×1080 (VideoMatte, YouTubeMatte) and V-HIM60 (Hard). Every mask-guided method receives the identical SAM3 mask track, so no method gets a privileged mask. Lower is better throughout; underlined is the best baseline.

MethodVideoMatteYouTubeMatteV-HIM60 (Hard)
MAD ↓MSE ↓Grad ↓dtSSD ↓MAD ↓MSE ↓Grad ↓dtSSD ↓MAD ↓MSE ↓Grad ↓dtSSD ↓Conn ↓
SAM35.050.9412.023.112.351.1114.633.283.912.0918.375.086.97
MGM11.283.236.332.113.590.534.271.5766.3149.0217.5312.73114.70
MGM-IW5.010.355.011.382.410.384.251.372.890.844.862.744.08
MaGGIe4.260.273.611.231.670.505.111.462.721.036.053.184.72
MaGGIe-FT4.440.334.531.351.520.375.361.472.811.036.533.124.84
MatAnyone4.170.273.591.171.740.537.371.564.042.297.044.087.10
MatAnyone 24.040.243.131.131.520.446.461.484.732.936.693.708.06
VideoMaMa4.340.274.061.211.410.304.081.312.300.755.042.513.83
VideoMaMa++ (ours)3.860.121.790.821.150.233.271.171.690.452.921.982.72

VideoMaMa++ is best on every metric of every benchmark. The margins are largest on Grad (boundary sharpness — 1.79 vs 3.13 on VideoMatte) and dtSSD (temporal smoothness — 0.82 vs 1.13), the two metrics that target fine detail and stability over time.

Consistency across chunk boundaries

Three measurements of the failure mode VideoMaMa++ was built to fix.

Same frame, two chunks
0.71→0.26

With 6-frame chunks and a 2-frame overlap, every overlap frame is predicted twice. Marking it with the preserve token cuts the disagreement between the two predictions by 64% in MAD (Gradient: 0.68 → 0.12, −82%). Reference anchor disabled to isolate the token.

Annotation-free seam test
63/64vs18/64

YouTubeMatte clips whose chunk-seam frames change more than their interior frames: VideoMaMa 63/64, VideoMaMa++ 18/64. The ground truth, which involves no chunking, scores 32/64 — exactly chance — confirming the test reacts to seams, not content. In the wild: 14/16 vs 7/16.

Error accumulation
+32.8%→+11.9%

Growth of MAD by the last chunk relative to the first, on YouTubeMatte, without vs with the reference anchor (VideoMatte: +4.3% → +0.9%). Overlap propagation alone lets errors compound; the anchor keeps the curve flat.

Long-video temporal consistency: VideoMaMa++ versus other methods

Long videos that no diffusion model can matte in a single chunk. Baselines either miss fine detail or flicker where chunks meet; VideoMaMa++ stays smooth across chunks while still capturing detail that only emerges in later frames.

MAD change relative to the first chunk, with and without the reference anchor

Reference anchor, ablated

SettingMAD ↓Grad ↓dtSSD ↓
VideoMatte (1920×1080)
w/o anchor3.952.240.86
w/ anchor3.861.790.82
YouTubeMatte (1920×1080)
w/o anchor1.274.421.18
w/ anchor1.153.271.17

The anchor needs no extra training: the preserve token already treats any supplied matte as a reference. Any frame of the first chunk works as the anchor, and even a fully occluded anchor frame leaves V-HIM60 MAD at 1.76 vs 1.71 with a clean one.

Interactive refinement

The same tokens give users control at inference time. Re-tag a bad frame as refine, keep its trusted neighbours as preserve, and re-run: the frame is regenerated from the context of the rest of the chunk — no new mask needed.

Interactive refinement: before and after re-tagging a frame as refine
IterationMAD ↓MSE ↓Grad ↓dtSSD ↓
1 (initial)1.6920.4232.9811.976
21.6690.3992.9681.959
31.6630.3952.9631.955

V-HIM60 (Hard). Each pass re-refines the worst frame of every chunk; quality improves monotonically.

What matters

Ablations on V-HIM60 (Hard). Lower is better.

Token vs channel concat

FusionMADGrad
Channel2.234.71
Token1.692.98

Collapsing RGB, mask and noise into one tensor loses modality-specific information.

Denoising steps

StepsMADGrad
11.672.97
21.722.97
32.733.81
1016.636.12

One step converts the mask into a matte; more steps over-refine it.

Chunk size

FramesMADdtSSD
32.122.21
61.691.98
121.792.07

Small chunks starve attention of context; large ones dilute the preserve frames.

Mask generator

TrackerInputOurs
XMem5.563.11
Cutie3.701.94
SAM24.081.90
SAM33.911.69

MAD of the binary input vs our matte: robust to whichever tracker made the mask.

BibTeX

@inproceedings{lim2026videomamapp,
  title     = {VideoMaMa++: Temporally Consistent Video Matting via Preserve-and-Refine Tokens},
  author    = {Lim, Sangbeom and Oh, Seoung Wug and Yoon, Heeji and Kim, Seungryong and Lee, Joon-Young},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}

VideoMaMa++ builds on VideoMaMa; if you use the mask-guided diffusion-matting setup, please consider citing it as well:

@article{lim2026videomama,
  title   = {VideoMaMa: Mask-Guided Video Matting via Generative Prior},
  author  = {Lim, Sangbeom and Oh, Seoung Wug and Huang, Jiahui and Yoon, Heeji and Kim, Seungryong and Lee, Joon-Young},
  journal = {arXiv preprint arXiv:2601.14255},
  year    = {2026}
}