D^2iT: Dynamic Diffusion Transformer for Accurate Image Generation

Weinan Jia, Mengqi Huang, Nan Chen, Lei Zhang, Zhendong Mao

Abstract

Diffusion Transformers (DiT) have set new benchmarks in image generation but suffer from inefficiencies due to fixed compression ratios across varying image regions. We present $D^2iT$ (Dynamic Diffusion Transformer), a two-stage framework that adaptively allocates tokens based on local information density. By using fewer tokens for redundant backgrounds and more for complex details, $D^2iT$ achieves a 23.8% improvement in FID on ImageNet while utilizing only 57.1% of the training resources compared to standard DiT-XL.

Introduction: The Inefficiency of Fixed Compression

State-of-the-art image generation models like the Diffusion Transformer (DiT) typically apply a uniform downsampling rate to all image patches. This "one-size-fits-all" approach creates a fundamental trade-off between local realism and global consistency. High compression ratios reduce computational costs but sacrifice fine textures, leading to artifacts in detailed areas like faces or hair. Conversely, low compression preserves detail but increases sequence length quadratically, making global structure harder to maintain and exploding computational requirements.

Comparison between fixed compression in standard DiT and dynamic compression in $D^2iT$.

$D^2iT$ addresses this by introducing dynamic granularity, where the model intelligently decides which regions require high-resolution representation and which can be compressed more aggressively.

Methodology

The $D^2iT$ framework operates in two distinct stages: a Dynamic VAE for multi-grained representation and a specialized Transformer for generative modeling.

1. Dynamic VAE (DVAE)

The DVAE replaces standard fixed-rate downsampling with a hierarchical encoder. It utilizes Shannon entropy—calculated via Gaussian kernel density estimation—to assess the complexity of image regions. Smooth, low-entropy regions are downsampled more (e.g., 16x), while detailed, high-entropy regions are preserved at higher resolutions (e.g., 8x). This results in a multi-grained latent code that scales with visual information rather than spatial area.

2. Dynamic Diffusion Transformer ($D^2iT$)

The generative process is split into two components:

  • Dynamic Grain Transformer: This module predicts a "grain map" from random noise, serving as a spatial blueprint for detail allocation.
  • Dynamic Content Transformer: This core component uses a "Multi-grained Net" for global structure and a "Fine-grained Net" (RefineNet) for local sharpening. To maintain efficiency, the RefineNet employs mini-window self-attention, avoiding the complexity spikes associated with long token sequences.
The two-stage architecture of $D^2iT$, featuring Dynamic VAE and Dynamic Content Transformer.

Key Insights

  • Information-Density-Based Diffusion: By treating entropy as a proxy for importance, $D^2iT$ mimics human artistic processes—blocking out global shapes before refining focal points.
  • Computational Efficiency: The routing strategy ensures that expensive fine-grained layers are only applied to necessary patches. This allows $D^2iT$-XL to outperform standard models while using significantly fewer training cycles.

Results and Evaluation

The model was benchmarked on FFHQ (256×256) and ImageNet (256×256).

  • ImageNet: $D^2iT$-XL achieved an FID of 1.73, a 23.8% improvement over the baseline DiT-XL (2.27).
  • FFHQ: $D^2iT$-L reached an FID-10K of 4.47, significantly better than the 6.26 achieved by standard DiT-L.
  • Convergence: The model demonstrates faster convergence, as it avoids learning redundant information in low-entropy background regions.

Conclusion and Future Work

$D^2iT$ demonstrates that dynamic tokenization is a powerful tool for scaling diffusion models. Future research may extend this to multi-level hierarchies beyond dual-grained representations and apply dynamic compression to the temporal dimension for efficient video generation.

Summary updated

BibTeX
@inproceedings{jia2025d,
  author = {Weinan Jia and Mengqi Huang and Nan Chen and Lei Zhang and Zhendong Mao},
  title = {{D^2iT: Dynamic Diffusion Transformer for Accurate Image Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01200},
}
Figure