One-way ticket: Time-Independent Unified Encoder for Distilling Text-to-Image Diffusion Models

Senmao Li, Lei Wang, Kai Wang, Tao Liu, Jiehang Xie, Joost van de Weijer, Fahad Shahbaz Khan, Shiqi Yang, Yaxing Wang, jian Yang

TL;DR

This paper introduces TiUE, a novel approach to distilling text-to-image diffusion models that significantly speeds up inference by reusing the encoder's features across multiple decoder steps. By decoupling the encoder and decoder roles, TiUE achieves loop-free generation, producing high-quality and diverse images with computational efficiency comparable to existing one-step methods.

What Problem Does This Paper Address?

Text-to-image (T2I) diffusion models are powerful but notoriously slow during inference. While distillation techniques have emerged to speed them up by reducing the number of sampling steps, these distilled models often sacrifice image quality and diversity, especially in one-step generation. The authors identify redundant computations within the UNet encoder as a key bottleneck and propose a new architecture to address this.

Methods

The core innovation is the Time-independent Unified Encoder (TiUE). Unlike traditional diffusion models where the encoder and decoder are tightly coupled and operate iteratively, TiUE separates these roles. The key ideas are:

  • Shared Encoder Features: The UNet encoder is used only once at the beginning of the generation process (at a key time step, denoted as K). Its output features are then fed to the decoder.
  • Parallel Decoding: The UNet decoder then processes these shared encoder features across multiple time steps (from K down to 1) in parallel. This "loop-free" approach eliminates the iterative dependency of the encoder on previous steps.
  • KL Divergence Regularization: To ensure the student model's noise predictions remain close to a standard normal distribution (a property of the original diffusion model), a KL divergence loss is introduced. This helps maintain perceptual realism and diversity.
  • Variational Score Distillation (VSD): The authors leverage VSD for distillation, which is known to be more robust than standard Score Distillation Sampling (SDS) for generating diverse and high-fidelity images.

Datasets

The paper uses standard datasets for evaluation:

  • AFHQ [6], CelebA-HQ [27]: Used for evaluating image generation quality and diversity, particularly for animal and human faces.
  • DrawBench [61], PartiPrompts [81]: Prompt datasets used for evaluating text-to-image generation.
  • COCO 2014 & 2017: Standard benchmarks for text-to-image generation evaluation.
  • JourneyDB [54]: A large dataset of text-image captions used for training the student generator.

Key Insights and Ideas

  • Decoders are Semantic Powerhouses: The authors' analysis suggests that UNet decoders are more adept at capturing rich semantic information than encoders. This insight justifies reusing decoder steps to extract more meaning from a single encoder output.
  • Encoder Redundancy: The UNet encoder performs redundant computations across different time steps in standard diffusion models. TiUE directly tackles this by using the encoder only once.
  • Decoupling for Speed: By decoupling the encoder and decoder, the model can perform parallel decoding, leading to significant speedups without sacrificing the multi-step decoder's ability to generate high-quality images.
  • KL Divergence for Stability: The KL divergence loss is crucial for maintaining the desirable properties of the original diffusion model's noise distribution, which is often overlooked in distillation but contributes to realism and diversity.

Key Results

  • Speed: TiUE achieves a "one-pass" generation, meaning the encoder is used only once. This results in significantly reduced inference time, comparable to existing one-step methods like LCM and SD-Turbo.
  • Quality & Diversity: TiUE outperforms state-of-the-art one-step distillation methods (LCM, SD-Turbo, SwiftBrushv2) in terms of FID, Density, and Coverage metrics across multiple benchmarks. Qualitative results show TiUE generating images that are more diverse and realistic, approaching the quality of the original 50-step SD model.
  • Efficiency: Despite its improved performance, TiUE maintains computational efficiency, with inference times comparable to other one-step methods.

Limitations and Future Work

  • Image-Dependent Distillation: The current work focuses on image-free distillation. The authors suggest that extending the shared encoder strategy to image-dependent distillation could further enhance inference speed without compromising quality, though this would require engineering effort.
  • Potential for Misuse: The authors acknowledge the potential for generative models like TiUE to be used for creating misleading content, infringing on privacy, or raising copyright issues.
  • Hyperparameter Tuning: While K=4 was found to be effective, exploring a wider range of K values and further fine-tuning could potentially yield even better results.
  • Extremely Large Models: The authors note that distilling extremely large T2I models (like SDXL) presents unique challenges in terms of time and space complexity, suggesting future work in this area.

Summary updated

BibTeX
@inproceedings{li2025one,
  author = {Senmao Li and Lei Wang and Kai Wang and Tao Liu and Jiehang Xie and Joost van de Weijer and Fahad Shahbaz Khan and Shiqi Yang and Yaxing Wang and jian Yang},
  title = {{One-way ticket: Time-Independent Unified Encoder for Distilling Text-to-Image Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02194},
}
Figure