TeEFusion: テキスト埋め込みの融合によるClassifier-Free Guidanceの蒸留
TeEFusion: Blending Text Embeddings to Distill Classifier-Free Guidance
July 24, 2025
著者: Minghao Fu, Guo-Hua Wang, Xiaohao Chen, Qing-Guo Chen, Zhao Xu, Weihua Luo, Kaifu Zhang
cs.AI
要旨
最近のテキストから画像への合成技術の進歩は、高品質な生成を保証するための洗練されたサンプリング戦略とクラス分類器不要ガイダンス(CFG)に大きく依存しています。しかし、CFGは2回のフォワードパスを必要とし、特に複雑なサンプリングアルゴリズムと組み合わせると、推論コストが非常に高くなります。この問題を解決するため、我々はTeEFusion(Text Embeddings Fusion)を提案します。これは、ガイダンスの大きさを直接テキスト埋め込みに組み込み、教師モデルの複雑なサンプリング戦略を蒸留する新しい効率的な蒸留手法です。条件付きと無条件のテキスト埋め込みを線形演算で融合するだけで、TeEFusionは追加のパラメータを必要とせずに所望のガイダンスを再構築し、同時に学生モデルが教師モデルの洗練されたサンプリング手法による出力から学習できるようにします。SD3のような最先端モデルを用いた広範な実験により、我々の手法が学生モデルに教師モデルの性能を非常にシンプルで効率的なサンプリング戦略で密接に模倣させることを実証しました。その結果、学生モデルは教師モデルと同等の画像品質を維持しつつ、推論速度を最大6倍高速化することができました。コードはhttps://github.com/AIDC-AI/TeEFusion{github.com/AIDC-AI/TeEFusion}で公開されています。
English
Recent advances in text-to-image synthesis largely benefit from sophisticated
sampling strategies and classifier-free guidance (CFG) to ensure high-quality
generation. However, CFG's reliance on two forward passes, especially when
combined with intricate sampling algorithms, results in prohibitively high
inference costs. 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 6times 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
https://github.com/AIDC-AI/TeEFusion{github.com/AIDC-AI/TeEFusion}.