Abstract
Diffusion models have revolutionized generative AI but remain computationally expensive due to their iterative denoising process. While many techniques focus on reducing the number of sampling steps, the high inference cost of the denoising network at each step remains a significant bottleneck. We propose One-to-Many Knowledge Distillation (O2MKD), a framework that addresses this by distributing the denoising task across a group of specialized student models. By partitioning the timestep range, each student becomes an expert in a specific phase of image generation. Our results demonstrate that O2MKD significantly improves both generation speed and image quality across various benchmarks, including Stable Diffusion.
Introduction
The primary hurdle for deploying state-of-the-art diffusion models on resource-constrained devices is their massive computational requirement. Standard Knowledge Distillation (KD), a common technique for model compression where a small "student" mimics a large "teacher," often struggles in this domain. The fundamental reason for this failure is that the denoising task is not static; a single lightweight student model lacks the parameter capacity to master the diverse data distributions encountered across the entire denoising trajectory.
The Challenge: Diffusion as a Moving Target
A diffusion model's task evolves significantly from the initial noise-heavy steps to the final refinement steps. At high timesteps, the model must interpret pure noise to establish global structure; at low timesteps, it processes nearly clean images to add fine-grained details.
As illustrated in the figure above, both the frequency of feature values and the range of activation values shift as the timestep progresses. This "moving target" phenomenon means that a single small student model forced to learn the entire range often ends up as a "jack-of-all-trades, master of none," leading to poor image quality and high FID scores.
Methods: One-to-Many Knowledge Distillation (O2MKD)
To overcome the capacity bottleneck, the authors introduce One-to-Many Knowledge Distillation. Instead of training one student to cover the full range $t \in [0, T]$, the process is divided among $N$ students.
Timestep Partitioning and Specialized Training
The total denoising time $T$ is partitioned into $N$ segments. Each student in the group is assigned a specific segment. For example, with $N=3$, Student #1 might handle $t \in [0, T/3]$, Student #2 handles $t \in [T/3, 2T/3]$, and Student #3 handles $t \in [2T/3, T]$.
During training, a student is primarily exposed to its assigned segment with a high probability $p$, while occasionally seeing the full range (probability $1-p$) to maintain a general understanding of the diffusion process. This prevents over-specialization while allowing the model to become an "expert" in its narrow window. Furthermore, the authors found that KD provides a smoother supervisory signal than standard Mean Squared Error (MSE) loss, which is critical when training very small student models.
Inference and Model Merging
At runtime, the system switches between students as it progresses through the timesteps. To mitigate the memory overhead of storing $N$ separate models, the authors demonstrate that these specialized students can be "merged" back into a single model post-training using weight-averaging techniques, preserving most performance gains without increasing the storage footprint.
Experimental Results
The O2MKD framework was evaluated on several benchmarks, including CIFAR10, LSUN Church, CelebA-HQ, and Stable Diffusion (COCO30K).
- Efficiency and Quality: On CIFAR10, O2MKD achieved a 1.8x speedup while simultaneously improving the Frechet Inception Distance (FID) score compared to the teacher model.
- Superiority over Standard KD: On the LSUN Church dataset, a student trained with standard KD yielded an FID of ~24. Applying O2MKD to the same student architecture reduced the FID to 11.74, a dramatic improvement in visual fidelity.
- Stable Diffusion Enhancements: When applied to a pruned version of Stable Diffusion v1.4, O2MKD improved the FID from 17.12 to 14.21 and increased the CLIP score, indicating better alignment between generated images and text prompts.
Conclusion and Future Work
O2MKD provides a powerful, orthogonal approach to accelerating diffusion models. It complements existing fast-sampling techniques by making each individual step faster and more accurate. While the current implementation uses uniform timestep partitioning, future work could explore non-uniform splits to allocate more "student power" to the most critical phases of the denoising process. Additionally, further research into model merging techniques will be vital for minimizing the memory footprint of multi-student ensembles in production environments.
Summary updated