Pre-trained generative models offer rich visual priors for image matting, but their adaptation often relies on variational autoencoders (VAEs), whose spatial compression can degrade fine alpha details and introduce additional inference overhead. To address these limitations, we propose X-Matte, a VAE-free pixel-space flow matching framework for single-step image matting. By eliminating latent compression, X-Matte formulates the RGB-to-alpha transition as a continuous flow directly in pixel space. We adopt trajectory-wide x-prediction with transition-aware alpha supervision, enabling the model to learn from intermediate states while directly predicting the target alpha matte in a single forward pass. This design avoids both VAE encoding and decoding and iterative sampling. Extensive experiments demonstrate performance competitive with state-of-the-art trimap-free matting methods on P3M benchmarks, together with promising zero-shot generalization to RWP-636 and AIM-500. Moreover, X-Matte achieves up to a 9.4x inference speedup over a constructed single-step latent counterpart at high resolution, demonstrating the effectiveness of VAE-free pixel-space modeling for accurate and efficient image matting.
Figures & tables
Figure 2: Overview of X-Matte. Top: During training, the interpolated state zt=tα3c+(1−t)x is supervised by Lgen and Lta at every timestep via x -prediction—directly in pixel space, without VAE compression. The learnable positional embedding (flame icon) adapts to matting resolution during fine-tuning. Bottom: At inference, a single-step x -prediction maps RGB directly to alpha, with dynamic positional embedding interpolation enabling arbitrary input resolutions.
Method
P3M-500-P
P3M-500-NP
SAD ↓
MSE ↓
Grad ↓
Conn ↓
SAD ↓
MSE ↓
Grad ↓
Conn ↓
Discriminative
LF (CVPR 19) [ 51 ]
42.95
19.1
42.19
18.80
32.59
13.1
31.93
19.50
HATT (CVPR 20) [ 29 ]
25.99
5.4
14.91
25.29
30.53
7.2
19.88
27.42
P3M-Net (ACM MM 21) [ 16 ]
8.73
2.6
8.22
13.88
11.23
3.5
10.35
12.51
MODNet (AAAI 22) [ 12 ]
13.31
3.8
16.50
10.88
16.70
5.1
15.29
13.81
Table 1: Quantitative comparison on P3M-500-P and P3M-500-NP. All methods are evaluated on the whole image without any user priors (trimap-free). ↓ indicates lower is better. Best results are in bold . Results of GenPercept and TeachMatte are obtained by running their official code under a unified evaluation protocol; for SMat and Alpha-Free-Matting we report numbers from their original papers, and entries not covered there are marked with ‘-’.
Figure 3: Qualitative comparison with MODNet [ 12 ] . In this example, X-Matte better preserves fine hair structures and achieves lower SAD than MODNet (6.5 vs. 49.9).
Method
SAD ↓
MSE ↓
LF (CVPR 19) [ 51 ]
71.18
42.3
HATT (CVPR 20) [ 29 ]
53.45
23.4
MODNet (AAAI 22) [ 12 ]
42.63
22.7
GFM (IJCV 22) [ 17 ]
37.93
22.0
SMat (CVPR 24) [ 47 ]
35.34
13.6
X-Matte-H (Ours)
27.98
12.8
Table 2: Zero-shot generalization on RWP-636, a real-world portrait matting benchmark. All methods are trained on P3M-10k without additional fine-tuning.
Method
SAD ↓
MSE ↓
P3M-Net (ACM MM 21) [ 16 ]
103.03
54.5
GenPercept (ICLR 25) [ 42 ]
56.36
20.1
X-Matte-H (Ours)
44.45
18.8
Table 3: Zero-shot generalization on AIM-500, containing natural images entirely unseen during P3M-10k training. All methods are trained on P3M-10k without fine-tuning.
Figure 4: Effect of transition-aware weighting. Predicted alpha mattes and error maps comparing X-Matte with and without transition region weighting ( w/o wt ). Adding the spatially adaptive weight reduces per-image SAD from 20.8 to 17.2, with error maps confirming concentrated improvement in the fine hair transition zone (red = high error, blue = low error).
Method
SAD ↓
MSE ↓
Grad ↓
Conn ↓
Discriminative
w/o pre-training
81.67
41.21
50.69
80.76
w/ pre-training
36.87
16.14
33.63
35.83
Generative (latent, v -pred)
w/o pre-training
60.76
24.01
37.00
55.95
w/ pre-training
25.17
7.67
31.46
21.92
Table 4: Paradigm ablation on P3M-500-P. All variants share the same backbone pre-trained on ImageNet at 256×256 . Experiments are conducted at 256×256 to isolate paradigm differences under controlled conditions. The discriminative baseline fixes t=0 throughout training; generative variants use flow matching.
Configuration
SAD ↓
MSE ↓
Grad ↓
Conn ↓
Baseline ( ℓ2 loss)
11.61
3.6
13.47
10.99
+Lta
10.64
3.0
12.39
9.87
+\ pos_embed interp. †
9.79
2.8
11.82
9.24
+\ learnable pos_embed
9.53
2.7
11.54
9.01
+\ higher-res training
8.61
2.3
10.97
8.01
Table 5: Ablation study on P3M-500-P. All models use the same generative backbone with ImageNet pre-trained weights. Each row cumulatively adds one component.
Figure 5: Effect of inference resolution. Alpha predictions (top) and error maps (bottom) at 512px, 768px, and 1024px using the same checkpoint. The corresponding per-image SAD values are 29.63, 14.23, and 13.15. Higher resolution recovers finer hair details. Red indicates higher error and blue lower error.
Steps
SAD ↓
MSE ↓
1
8.61
2.3
2
9.21
2.5
4
9.11
2.5
8
9.44
2.6
Table 6: Effect of inference steps on P3M-500-P using X-Matte-B. Lower is better.
Reso
Method
Params
Latency ↓
SAD ↓
5122
Latent (VAE+SiT)
∼ 220M
47.4 ms
15.40
X-Matte (Ours)
∼ 140M
8.7 ms ( 5.4× )
9.84
10242
Latent (VAE+SiT)
∼ 220M
177.8 ms
12.77
X-Matte (Ours)
∼ 140M
19.0 ms ( 9.4× )
8.65
Table 7: Computational efficiency at high resolutions (RTX 4090, batch=1). The latent baseline is our constructed counterpart (VAE + the same SiT-B, single-step). Both are evaluated using float16 precision with memory-efficient attention (e.g., FlashAttention) for a fair comparison. SAD is evaluated on P3M-500-P under the same evaluation protocol for both ( ↓ indicates lower is better).
High-resolution video matting requires accurate recovery of continuous alpha values, including fine hair, soft boundaries, and motion blur, yet dense alpha supervision remains scarce. Pretrained text-to-video diffusion transformers (DiTs) offer rich spatio-temporal priors, whereas existing generative video matting approaches typically route alpha predictions through RGB-trained VAE latents, which can attenuate fine details and introduce additional decoding overhead. We present TokenMatte, which adapts a pretrained video DiT into a single-pass, auxiliary-free RGB-to-alpha predictor with a pixel-native output interface. At its core is a single shared linear readout that maps each spatio-temporal token directly to its corresponding (t×p×p) block of alpha pixels, predicting spatial details and temporal variations within the same local video block. Tiling these blocks produces the full-resolution alpha sequence without a convolutional decoder or learned upsampling. The predicted alpha is supervised directly in pixel space, while the ground-truth alpha never enters the VAE, eliminating target-side alpha encoding and output-side VAE decoding. Leveraging the pretrained video prior, TokenMatte is trained using only existing public matting datasets, without additional data curation or auxiliary inputs at inference. Compared with a matched latent-output baseline, our pixel-native interface improves matting accuracy while achieving a 1.51× inference speedup. TokenMatte establishes a new auxiliary-free state of the art on VideoMatte, YouTubeMatte, and V-HIM60.
Diffusion models have shown strong potential for image matting by transferring generative priors learned from large-scale pretraining. However, existing approaches largely rely on latent diffusion models, whose compressed representations and VAE-based reconstruction introduce a mismatch with the high-frequency precision required for matting. We present PixelMatte, a framework that adapts pretrained pixel-space diffusion transformers for high-fidelity image matting. We show that strong image-conditioned matting capabilities can be acquired even from a pure text-to-image model without paired image-to-image pretraining. Our approach reuses the backbone's native patch embedding to jointly process the input image, trimap, and noisy alpha matte as spatially aligned tokens, enabling direct pixel-space prediction without additional condition encoders or adapters. With pixel-accurate synthetic supervision and real-image fine-tuning, PixelMatte predicts alpha mattes in a single forward pass. Two lightweight calibration modules, LayerShift and High-Pass Refiner, further improve regional opacity accuracy and boundary fidelity. Experiments across four benchmarks and two distinct pixel diffusion backbones demonstrate substantial improvements over existing methods, reducing SAD and gradient errors by 24-44% relative to RenderMatte on P3M-500-NP and AM-2K, while achieving competitive performance on AIM-500 and RenderMatte-2K. These results demonstrate the effectiveness of pixel-space generative priors for precision-sensitive image matting. Project page: https://white-yc.github.io/pixelmatte/.
Baihan Yang, Xin Lin, Yufan Wei +5
University of California, San Diego · Princeton University · University of California, Irvine +1
Image matting is an essential enabling technology for modern visual content production, where foreground extraction determines the realism and editability of downstream creation workflows. However, precise alpha estimation in open-world scenes remains challenging because real foregrounds exhibit highly diverse appearances and opacity patterns. This makes existing methods struggle with semantic ambiguity and fine-grained opacity variation, especially in sparse boundary regions that are fragile and difficult to supervise. To address this gap, we present RenderMatte, a trimap-guided matting framework that adapts FLUX.1 Kontext through full-parameter fine-tuning, leveraging image editing priors for structure-preserving alpha prediction. During supervised adaptation, an alpha-edge objective preserves the latent flow-matching signal while strengthening pixel-space boundary supervision. We further introduce group-relative alpha alignment for post-training. It compares multiple mattes sampled under the same trimap condition using matting-specific rewards for alpha accuracy, boundary fidelity, trimap compliance, and compositional consistency. To overcome the lack of precise edge annotations, we construct the RenderMatte dataset, a large-scale synthetic dataset combining 3D-rendered RGBA foregrounds with diverse multi-source assets. It features exact strand-level alpha annotations and diverse background composites. Experiments show state-of-the-art performance across all benchmarks, demonstrating a scalable path toward high-fidelity matting in open-world scenes.
Zecheng Ren, Yafei Hu, Jianing Zhao +3
Waseda University · Shanghai Jiao Tong University · National University of Singapore