MatAnyone-E

Sparse Memory Propagation for Efficient High‑Resolution Video Matting

Shuyun Wang1,2,Shangchen Zhou2†,Peiqing Yang2,Yuekun Dai2,Xin Yu3*,Chen Change Loy2*

1The University of Queensland2Nanyang Technological University3University of Adelaide

† Project lead  ·  * Co-corresponding authors

MatAnyone-E (C.), compiled with torch.compile, mattes native 4K video at 28.6 FPS on a single H200. That is 12× faster than MatAnyone 2 (C.), and it needs only 3.1 GB of GPU memory.

Abstract

High-resolution video matting requires preserving fine details, such as hair strands and soft transparency, while maintaining consistency across frames. Memory-based methods achieve strong matting quality by matching current-frame features with information stored from earlier frames, but this process becomes increasingly costly as resolution grows. We present MatAnyone-E, an efficient extension of MatAnyone 2 that focuses computation where it is most needed. Our approach first performs low-resolution propagation to identify uncertain regions that require closer inspection and the memory candidates most relevant to them. It then performs high-resolution matching only for these regions using the selected memory, while reusing low-resolution matching results elsewhere. This strategy reduces both the number of locations requiring detailed matching and the amount of memory searched, while preserving the information needed to produce a complete matte. We further reduce the cost of generating high-resolution mattes with a lightweight decoder designed around measured runtime bottlenecks and trained to reproduce the original decoder's representations. Experiments show that MatAnyone-E maintains matting quality comparable to MatAnyone 2 while achieving an estimated 7.4× inference speedup and reducing peak GPU memory usage to 7.6% of MatAnyone 2 at 4K. With compilation-enabled inference on a single NVIDIA H200 GPU, it reaches 73.07 FPS at 1080p and 28.62 FPS at 4K.

Method

MatAnyone-E overview: encoder, Sparse Memory Propagation (low-resolution propagation, query pruning, memory pruning, high-resolution propagation), object transformer and lightweight decoder

MatAnyone-E keeps the architecture of MatAnyone 2 and replaces the two parts whose cost grows fastest with resolution. Sparse Memory Propagation first runs a cheap low-resolution pass. Its uncertainty selects the query locations that need detailed matching (query pruning), and its affinities select the memory most relevant to them (memory pruning). High-resolution matching then runs only on these query–memory pairs, and the upsampled low-resolution readout is reused everywhere else. A lightweight decoder, designed from stage-wise latency profiling and trained with feature distillation from the original decoder, further cuts the cost of decoding high-resolution mattes.

Results at native resolution

Where the computation goes

Click anywhere on the frame to see where that query reads from memory.

Gate
Memory
attention (log) 10−4 10−1
Query frame gated · refined at full resother queryselected

Efficiency & Accuracy

7.4×faster than MatAnyone 2 at 4K
13.1×less peak GPU memory than MatAnyone 2 at 4K
28.6 FPSnative 4K on one H200 (C.)
Against MatAnyone 2A800-SXM4-80GB
MatAnyone 2MatAnyone-EMatAnyone-E (C.)
Frames per second (FPS) ↑
Peak GPU memory (GB) ↓
Real time across GPUsMatAnyone-E (C.) frames per second (FPS) · dashed line = 25 FPS
MatAnyone-E (C.)
RTX 3090 · consumer
H200 NVL · datacenter
Accuracy, MAD (×10³) ↓
MethodVideoMatte HRYouTubeMatte HRCRGNN
VideoMaMa6.832.465.18
SAM2Matting4.743.165.80
MatAnyone 24.101.614.24
MatAnyone-E4.141.624.28

MatAnyone-E Demo

BibTeX

Coming soon.