TL;DR
Diffusion Transformers (DiTs) scale wonderfully for image generation, but their uniform, flat architecture learns slowly compared to classic hourglass-shaped U-Nets. This paper introduces the U-Net Diffusion Transformer (UDT), which brings U-Net efficiency to transformers without clumsy convolutional grid-crunching—instead, it progressively merges semantically similar patches (like empty sky) on the fly and unmerges them later. The result is a drop-in replacement backbone that cuts compute, improves image quality, and converges up to 40× faster than standard baselines.
What Problem Does This Paper Address?
If you look inside a standard Diffusion Transformer (like DiT or SiT), every layer looks identical—an "isotropic" stack of blocks processing the exact same number of image patches (tokens) from start to finish. Because the model’s ultimate job is to predict fine-grained noise, its deeper layers abandon high-level semantic understanding to focus on pixel-level reconstruction. You end up with a lopsided model: a very slow, deep encoder and a rushed, shallow decoder.
Researchers have tried two main fixes:
- Training crutches (like REPA): Forcing early layers to mimic an external pre-trained vision model (like DINOv2). It works, but adds training complexity and external dependencies.
- U-Net-style Transformers: Borrowing the classic CNN U-Net playbook by squishing $2\times2$ local neighborhoods of tokens together to downsample, and changing channel dimensions. However, forcing rigid spatial grids onto transformers breaks global self-attention dynamics, blurs fine details, and creates dimension mismatches that clash with text-to-image cross-attention or alignment techniques.
The authors ask: Can we build a true encoder-decoder U-Net inside a Diffusion Transformer without breaking what makes transformers great?
Methods
Enter UDT. Instead of squishing fixed $2\times2$ grids with learnable convolutions, UDT keeps the token feature dimension ($D$) completely untouched across the entire network and changes only the number of tokens ($T$) using parameter-free, data-adaptive Token Merging (ToMe).
Here is how a pass through UDT works:
- Full-Res Bookends: The very first encoder block and final decoder block run at full token resolution, linked by a classic skip connection so the model can still make crisp, dense noise predictions for every patch.
- Progressive Merging (Encoder): Starting at block two, UDT compares token keys to find semantically redundant patches across the entire image (e.g., background sky or uniform fur). Using fast bipartite soft matching, it merges the top-$r$ most similar pairs via a weighted average, gradually shrinking the sequence length down to a bottleneck (e.g., from 256 tokens down to 112). To ensure merged "super-tokens" carry appropriate weight in self-attention, UDT uses proportional attention (weighting tokens by how many original patches they represent).
- Exact Unmerging (Decoder): Because UDT records which tokens were merged during encoding, the decoder simply reverses the process—copying merged tokens back to their original slots step-by-step and fusing them with encoder skip connections via linear projections.
- $\text{UDT}^+$ and REPA: The baseline UDT uses zero extra bells and whistles. An enhanced variant ($\text{UDT}^+$) adds standard modern tweaks (SwiGLU, log-normal time sampling, and RoPE on the full-res first/last blocks). Furthermore, because UDT can trivially unmerge its bottleneck back to full patch resolution, it plugs into REPA (external DINOv2 alignment) with zero hacky adapter modules.
Datasets
- ImageNet ($256\times256$ and $512\times512$): The primary testbed for class-conditional generation, including a 10% ImageNet subset (128K images across all 1,000 classes) to test low-data efficiency.
- MSCOCO ($256\times256$): Used to evaluate text-to-image generation when swapping UDT into MMDiT.
- No new datasets are introduced.
Key Insights and Ideas
- Don't mix tokens with learnable layers—merge them by meaning: When the authors tried replacing data-adaptive merging with a learnable linear projection to reduce token counts, generation quality collapsed (FID worsened from 24.0 to 45.5!). Merging similar background patches preserves intricate foreground details that rigid grid downsampling blurs away.
- Architecture alone rivals external supervision: Linear probing shows that UDT naturally forms peak, crystal-clear semantic representations right at its bottleneck—matching the representation quality of models explicitly trained with external DINOv2 supervision (REPA), purely through better structural inductive bias.
- Taming long sequences effortlessly: Using a tiny patch size of 1 or moving to $512\times512$ images normally quadruples sequence length (1024 tokens), causing self-attention compute to explode ($\sim4.5\times$ GFLOPs). By aggressively merging 50% of redundant tiny patches in the first few blocks, UDT handles 4× longer sequences for only $1.3\text{--}2.2\times$ the compute.
Key Results
(Note: Lower FID is better.) * Massive Speedups (w/o Classifier-Free Guidance on ImageNet $256\times256$): Out-of-the-box UDT-XL/2 hits 7.7 FID in 80 epochs using ~25% fewer GFLOPs, beating SiT-XL/2's 7.9 FID at 1,400 epochs ($\sim20\times$ faster). Adding tweaks and REPA ($\text{UDT-XL/2}^+$ + REPA) reaches 7.6 FID in just 40 epochs ($\sim40\times$ faster). * State-of-the-Art System Quality (with CFG): On ImageNet $256\times256$, $\text{UDT-XL/2}^+$ + REPA reaches 1.38 FID (320 epochs, SD-VAE), and $\text{UDT-XL/1}^+$ hits 1.35 FID (500 epochs, VA-VAE). On ImageNet $512\times512$, fine-tuned $\text{UDT-XL/2}^+$ achieves 1.58 FID using just 30% of standard DiT GFLOPs. * Data Efficiency: Trained on just 10% of ImageNet, $\text{UDT-L/2}^+$ reaches 10.3 FID, easily beating a standard SiT-L/2 trained on 100% of ImageNet (18.8 FID) in $2.67\times$ less wall-clock time. * Universal Drop-in: Swapping UDT into $\epsilon$-prediction DiT, pixel-space JiT, and text-to-image MMDiT (improving MSCOCO FID from 5.5 to 4.7) consistently boosts speed and quality across the board.
Limitations and Future Work
While the main text does not feature a dedicated limitations section, one practical architectural constraint is noted: because dynamic token merging scrambles the fixed 2D grid indices of patches in intermediate layers, Rotary Positional Embeddings (RoPE) cannot be applied inside the merged middle blocks—restricting RoPE strictly to the full-resolution first and last layers. Broader limitations and future directions are not explicitly discussed in the main body of the paper.
Summary updated