Pixel-space diffusion transformers do matting in one pass, no VAE, errors down 24-44%

High-Fidelity Image Matting with Pixel-Space Diffusion Transformers

Baihan Yang, Xin Lin, Yufan Wei, Baiang Li, Yuheng Liu, Juanxi Tian, Xiaohui Xie, Truong Nguyen

cs.CV

2026-11-26

PixelMatte fine-tunes pixel-space diffusion transformers for trimap matting: single forward pass, no VAE, SAD down ~30% vs RenderMatte on P3M-500-NP and AM-2K, and faster inference.

What problem this solves

Image matting estimates a per-pixel alpha value for the foreground. Unlike segmentation's discrete labels, it is an ill-posed inverse problem: one observed pixel could come from a semi-transparent object or from foreground-background blending. Practice narrows it with a trimap, a three-way map marking definite foreground, definite background, and an unknown region where alpha must be recovered. The hard cases are hair, fur, and transparent boundaries, all of which need pixel-level precision.

The recent generative line of work adapts pretrained diffusion models, but almost all of it sits on latent diffusion: the network predicts in a spatially compressed latent space, and a frozen VAE decoder trained for natural images reconstructs the pixels. Matting is a high-frequency task, and hair-thin structure is never explicitly represented in the compressed code, so detail recovery rides indirectly on the generative prior. That is a representation mismatch, not something a loss tweak fixes.

Method

PixelMatte starts from pretrained pixel-space diffusion transformers, PRXPixel-7B and HiDream-O1-Image-8B (both rectified-flow models regressing the velocity from noise toward the clean sample; patch sizes 16 and 32), and never touches a VAE.

The one-step output shows two systematic errors: hard edges come out too wide, and regional alpha levels drift. The paper writes the near-edge error as level offset plus edge-profile error plus residual, and assigns one tiny module to each. LayerShift learns one vector per layer (36 × 4096 = 147K parameters on HiDream), added only to target tokens inside the unknown region, with the backbone frozen and 300 training steps. The High-Pass Refiner is a 1.3M-parameter CNN whose residual output passes through a high-pass operator that subtracts a Gaussian-blurred local mean, suppressing slowly varying corrections and keeping localized ones near boundaries.

Results

Four benchmarks, four metrics, against supervised (ViTMatte, MatteFormer) and diffusion (RenderMatte, DiffMatte) baselines:

SettingMetricRenderMattePixelMatte
P3M-500-NPSAD6.24.3 (HiDream-8B) / 4.7 (PRX-7B)
AM-2KSAD6.54.4 (HiDream-8B)
AIM-500Grad—24–31% lower, both backbones
RM-2K (synthetic)SAD3.333.31 (HiDream-8B), on par
Per image (H200)sec0.91 @1024²0.46 @1024² / 0.64 @2048²

The same-resolution comparison is PRX-7B at 1024², matching RenderMatte: SAD and Grad down 24–38%. HiDream infers at 2048² and cuts 30–44%. A HiDream model trained only on the synthetic stage already beats RenderMatte's Grad on all three real-image benchmarks. On AIM-500 the claimed win is Grad, with SAD described only as competitive; RM-2K is a tie.

Ablations on RM-2K (HiDream): LayerShift moves the one-step SAD from 3.74 to 3.66 with 147K parameters; the High-Pass Refiner alone reaches 3.38; together 3.31. PRX goes from 3.60 to 3.46. Decomposing error by location, the SAD contribution of saturated pixels within 3 px of a contour drops from 0.54 to 0.23 after refinement, so the refiner's gains sit at hard boundaries. The most telling experiment: swapping the refiner's input image for an unrelated one keeps about 95% of its RM-2K improvement, and a refiner retrained without RGB is comparable there (3.29 vs 3.32) while keeping 68–75% of the gain on the real benchmarks. The fine structure comes from the pixel-space backbone; the refiner calibrates boundaries the backbone already predicted. The same refiner also helps latent RenderMatte (3.33 to 3.28 on RM-2K), so learned boundary calibration transfers across backbones.

Why it matters

For anyone building matting, background replacement, or transparent-object compositing, this is usable now: numbers at the top of the trimap-matting table, single forward pass, no VAE, no test-time augmentation, code released.

The broader signal is for dense prediction. RenderMatte needed FLUX.1 Kontext, a backbone pretrained on paired image-to-image editing data. PixelMatte shows a pure text-to-image pixel-space backbone acquires strong image conditioning from patch-token concatenation plus supervised fine-tuning, so the paired pretraining step can be skipped. Combined with the observation that one-step σ = 1 inference reduces the model to a regressor, the recipe of using diffusion pretraining as a regression backbone deserves a try on other precision-sensitive dense tasks.

Limitations

The paper's own list: removing the compressed representation does not remove the limits of generative pretraining or of matting supervision. Residual low-amplitude alpha remains in saturated regions on RM-2K, some transparent objects on AIM-500 are sensitive to the noise seed, and the calibration modules are trained per backbone and do not fix every such error.

Three more from reading it. The gains concentrate on P3M-500-NP and AM-2K, exactly the training distribution of the real-data stage, so the in-domain advantage deserves a discount. HiDream's headline numbers come from 2048² inference, and the resolution effect is never isolated, leaving PRX as the only same-resolution comparison. The two calibration modules patch edge-width and level-offset errors that are partly artifacts of going one-step (the flow-matching weight w(1) = 0, so supervision is weakest at σ = 1); whether multi-step sampling would need them at all is not discussed, and there is no from-scratch non-diffusion control, so the diffusion pretraining contribution rests on indirect evidence.

Terms

Source

What people are saying

Related papers

All paper explainers