NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mixture of Efficient Diffusion Experts Through Automatic Interval and Sub-network Selection

Alireza Ganjdanesh, Yan Kang, Yuchen Liu, Richard Zhang, Zhe Lin, Heng Huang

Abstract

Latent Diffusion Models (LDMs) have achieved state-of-the-art performance in image generation but suffer from high computational costs due to iterative denoising. We present DiffPruning, a framework that optimizes LDMs by transforming them into a "Mixture of Efficient Experts." By automatically clustering denoising timesteps and employing an Expert Routing Agent (ERA) to select optimal sub-network architectures, DiffPruning achieves up to 2.8x speedup with minimal impact on image quality across various benchmarks.

Introduction

Diffusion Probabilistic Models (DPMs) are the backbone of modern generative AI. However, their reliance on dozens of iterative passes through massive neural networks creates a "denoising bottleneck," hindering deployment on edge devices. Traditional pruning methods often fail to compress LDMs effectively because these models are already optimized for efficiency and typically use a static architecture throughout the entire denoising process. DiffPruning addresses this by recognizing that different stages of denoising—from global layout generation to fine detail refinement—require different levels of model complexity.

Overview of DiffPruning: Transforming a standard LDM into a Mixture of Efficient Experts specialized for different time intervals.

Methodology

The DiffPruning framework consists of four primary stages designed to create a specialized mixture of experts.

1. Automatic Interval Selection

Rather than manual partitioning, the system measures gradient similarity (alignment) between timesteps. Empirical analysis reveals that these alignments form natural clusters, suggesting optimal points for switching between specialized "experts."

Cosine similarity matrices for FFHQ, ImageNet, LSUN-Bedroom, and LSUN-Church datasets, illustrating dataset-specific denoising clusters.

2. Elastic Fine-tuning

A pre-trained LDM is fine-tuned on specific intervals using "elastic" dimensions. During this phase, layers (depth) and channels/attention heads (width) are randomly dropped, creating an "implicit model zoo" within a single set of weights.

3. Expert Routing Agent (ERA)

The ERA is a lightweight GRU-based neural network that identifies the optimal sub-network configuration for each expert. Utilizing the Gumbel-Sigmoid trick, the ERA makes the discrete choice of pruning differentiable, allowing for end-to-end optimization against a specific computational budget (e.g., MACs).

4. Final Specialization

The selected architectures are fine-tuned a final time to maximize performance within their assigned intervals.

Experimental Results

DiffPruning was evaluated on LSUN-Church, LSUN-Bedroom, FFHQ, and ImageNet benchmarks using NVIDIA A100 GPUs.

  • Efficiency Gains: On LSUN-Bedroom, DiffPruning achieved a 1.87x throughput speedup at a 50% MACs budget with a competitive FID of 6.73.
  • Extreme Compression: At a 30% budget, the model reached a 2.87x speedup on ImageNet and FFHQ.
  • Comparison to Baselines: DiffPruning significantly outperformed standard structural pruning (SP) and pixel-space models like DDPM. For instance, a 70% pruned DiffPruning model maintained higher image quality than a standard pruned DDPM despite having nearly 10x fewer MACs.

Conclusion and Future Work

DiffPruning demonstrates that specializing models for specific denoising intervals is more effective than uniform pruning. Key insights include the dataset-specific nature of optimal denoising intervals and the efficiency of the "implicit model zoo" approach. Future work will explore increasing the number of experts beyond $N=2$ and adapting the framework for non-linear sampling schedules.

Summary updated

BibTeX
@inproceedings{ganjdanesh2024mixture,
  author = {Alireza Ganjdanesh and Yan Kang and Yuchen Liu and Richard Zhang and Zhe Lin and Heng Huang},
  title = {{Mixture of Efficient Diffusion Experts Through Automatic Interval and Sub-network Selection}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73030-6\_4},
}
Figure