Teefusion: Blending Text Embeddings to Distill Classifier-Free Guidance

Ming-Hao Fu, G. Wang, Xiaohao Chen, Qing-Guo Chen, Zhao Xu +2 more
7/1/2025
1 citation

No official code found. Best implementation: ATH-MaaS/TeEFusion (9 stars, last commit 2025-07-25).

Abstract

Recent advances in text-to-image synthesis largely benefit from sophisticated sampling strategies and classifier-free guidance (CFG) to ensure high-quality generation. However, $C F G$ ‘s reliance on two forward passes, especially when combined with intricate sampling algorithms, results in prohibitively high inference costs.

Show full abstract

To address this, we introduce TeEFusion (Text Embeddings Fusion), a novel and efficient distillation method that directly incorporates the guidance magnitude into the text embeddings and distills the teacher model's complex sampling strategy. By simply fusing conditional and unconditional text embeddings using linear operations, TeEFusion reconstructs the desired guidance without adding extra parameters, simultaneously enabling the student model to learn from the teacher's output produced via its sophisticated sampling approach. Extensive experiments on state-of-the-art models such as SD3 demonstrate that our method allows the student to closely mimic the teacher's performance with a far simpler and more efficient sampling strategy. Consequently, the student model achieves inference speeds up to $6 \times$ faster than the teacher model, while maintaining image quality at levels comparable to those obtained through the teacher's complex sampling approach. The code is publicly available at github.com/AIDC-AI/TeEFusion.

View on arXivView PDF

Code Implementations(1)

ATH-MaaS/TeEFusionCommunity72%

TeEFusion: Blending Text Embeddings to Distill Classifier-Free Guidance (ICCV 2025)

92Jul 10, 20251 years agoNOASSERTION
classifier-free-guidancedistillation-modelsd3text-to-image

Similar Papers

Cite this paper

@article{fu2025teefusion,
  title  = {Teefusion: Blending Text Embeddings to Distill Classifier-Free Guidance},
  author = {Ming-Hao Fu and G. Wang and Xiaohao Chen and Qing-Guo Chen and Zhao Xu and Wei-Hua Luo and Kai-Fu Zhang},
  year   = {2025},
  eprint = {2507.18192},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2507.18192},
  journal = {IEEE International Conference on Computer Vision}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.18192.svg)](https://codeofpaper.com/paper/2507.18192)

Discussion