Random Conditioning for Diffusion Model Compression with Distillation

Dohyun Kim, Sehwan Park, Geonhee Han, Seung Wook Kim, Paul Hongsuck Seo

Abstract: Large-scale diffusion models like Stable Diffusion have set new benchmarks in text-to-image generation but remain computationally prohibitive for edge deployment. While Knowledge Distillation (KD) offers a path toward model compression, existing methods are limited by a "generalization gap": student models often fail to generate concepts not explicitly represented in the distillation dataset. To address this, we introduce Random Conditioning, a novel distillation strategy that decouples images from their original captions during training. By pairing noisy images with random text prompts according to a noise-dependent schedule, the student model learns to generalize to a vast prompt space without the need for expensive synthetic image generation. Our approach achieves state-of-the-art performance, including a 14.72% improvement in FID over existing compressed models, while significantly reducing parameter counts.

1. Introduction

Diffusion models have revolutionized visual content creation, yet their massive parameter counts and iterative sampling processes pose significant challenges for real-time applications. Knowledge Distillation (KD) has emerged as a primary technique for compressing these models into smaller "student" architectures. However, generative distillation faces a unique challenge compared to discriminative tasks. In image classification, a student can often generalize from a few examples. In contrast, conditional diffusion models are highly sensitive to the prompt space; if a specific concept (e.g., "a sea turtle") is missing from the distillation image-text pairs, the student typically fails to generate it, even if the teacher model possesses that knowledge.

To bridge this gap, researchers typically resort to generating millions of synthetic images using the teacher model to cover the prompt space. This "data-heavy" approach is computationally expensive and requires massive storage and processing power.

2. The Random Conditioning Method

The core innovation of this work is Random Conditioning, a simple yet powerful modification to the standard distillation pipeline. In a typical KD setup, a noised image $x_t$ is paired with its original caption $c$. The student $S$ is then trained to match the teacher $T$'s predicted noise $\epsilon_T$ and internal feature representations.

Random Conditioning proposes replacing the original caption $c$ with a random prompt $\tilde{c}$ sampled from a large, text-only corpus. This swap is governed by a probability $p(t)$ that depends on the diffusion timestep $t$.

The Random Conditioning distillation framework. The student model learns from the teacher by matching both feature maps and output noise, using a mix of original and random text prompts.

The intuition behind this approach lies in the varying role of text conditioning across the diffusion process:

  • High Noise Levels (Large $t$): The input $x_t$ is nearly pure noise. Here, the model relies almost exclusively on the text prompt to determine the global structure of the image. By providing a random prompt $\tilde{c}$, we force the student to learn how the teacher would interpret that specific text from scratch.
  • Low Noise Levels (Small $t$): The image structure is already established. The model focuses on local refinements and texture, becoming less sensitive to the global prompt. At these stages, the training remains "truthful" to the original image-text pair to ensure high-fidelity reconstruction.

By using an exponential schedule for $p(t)$, the model explores new concepts at high noise levels while maintaining structural integrity at low noise levels. This allows the student to tap into the teacher's internal knowledge of unseen concepts without requiring the teacher to actually generate those images beforehand.

3. Experimental Results

The effectiveness of Random Conditioning was evaluated using the LAION-Aesthetics and MS-COCO datasets. The researchers compared their models (B-Base and C-Micro) against BK-SDM, the previous state-of-the-art in diffusion compression.

3.1 Quantitative Performance

The proposed "B-Base" model demonstrated significant gains across all standard metrics. It achieved a 14.72% improvement in Fréchet Inception Distance (FID) and an 8.29% increase in Inception Score compared to the baseline. Even the "C-Micro" variant, which features 30% fewer parameters than the smallest previous models, outperformed its larger predecessors across all metrics.

3.2 Learning the Unseen

To test the generalization capabilities of the method, the authors conducted a "stress test" where they intentionally excluded all animal-related images from the distillation dataset.

Qualitative comparison of models trained with and without Random Conditioning. In the "Animal Condition" (right), the student trained without random conditioning fails to generate recognizable animals, whereas the student with random conditioning successfully distills the teacher's knowledge.

As shown in the figure above, a student model trained without Random Conditioning (middle row) fails to generate a turtle or a deer when prompted, as it never saw such pairs during training. However, the student trained with Random Conditioning (bottom row) successfully generates these animals by distilling the teacher's response to random animal-related prompts, despite never seeing a "real" animal image during its own training.

4. Conclusion and Future Work

Random Conditioning provides a highly efficient path toward compressing large-scale diffusion models. By decoupling the image from its condition at high noise levels, the method enables "zero-shot" distillation of concepts, effectively turning text-only datasets into a rich training resource. This bypasses the need for massive synthetic image generation, making model compression more accessible.

Future research may explore the application of this technique to other generative domains, such as video and audio synthesis, and investigate more sophisticated prompt-sampling strategies to further improve compositional generation in extremely small models.

Summary updated

BibTeX
@inproceedings{kim2025random,
  author = {Dohyun Kim and Sehwan Park and Geonhee Han and Seung Wook Kim and Paul Hongsuck Seo},
  title = {{Random Conditioning for Diffusion Model Compression with Distillation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01734},
}
Figure