TeEFusion: Blending Text Embeddings to Distill Classifier-Free Guidance
TeEFusion通过融合文本嵌入来蒸馏分类器无关的指导,显著提高了文本到图像生成模型的推理速度,同时保持了图像质量。
更新于 2025-07-29。作者:Minghao Fu、Guo-Hua Wang、Xiaohao Chen、Qing-Guo Chen、Zhao Xu、Weihua Luo、Kaifu Zhang。
中文摘要
近年来,文本到图像合成领域的最新进展主要得益于复杂的采样策略和无分类器引导(CFG),以确保生成高质量图像。然而,CFG依赖于两次前向传递,尤其是当与复杂的采样算法结合时,导致推理成本极高。为了解决这个问题,我们引入了一种名为TeEFusion(文本嵌入融合)的新型高效蒸馏方法,该方法直接将引导幅度纳入文本嵌入中,并蒸馏教师模型的复杂采样策略。通过简单地使用线性操作融合条件性和无条件性文本嵌入,TeEFusion重建所需的引导,而不添加额外参数,同时使学生模型能够从教师通过其复杂的采样方法产生的输出中学习。在SD3等最先进模型上的大量实验表明,我们的方法使学生能够以简单得多且更高效的采样策略接近教师的表现。因此,学生模型在保持图像质量与教师通过复杂采样方法获得的水平相当的同时,推理速度比教师模型快6倍。代码已在https://github.com/AIDC-AI/TeEFusion上公开发布。
英文摘要
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}.
解读
一句话总结
TeEFusion通过融合文本嵌入来蒸馏分类器无关的指导,显著提高了文本到图像生成模型的推理速度,同时保持了图像质量。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:文本到图像生成模型中,分类器无关的指导(CFG)虽然能保证高质量的图像生成,但其依赖两次前向传递,导致推理成本过高。
- 现有方案不足:现有的指导蒸馏方法通常需要复杂的架构和额外的参数,难以在大规模模型中实施。
- 研究目标:提出一种简单而有效的蒸馏方法,将指导信息直接集成到文本嵌入中,同时允许学生模型从教师模型的复杂采样策略中学习。
问题2:论文的核心创新点是什么?
- 技术创新:提出TeEFusion,通过线性操作融合有条件和无条件文本嵌入,将指导强度直接集成到文本嵌入中。
- 方法改进:TeEFusion不引入任何额外参数,简化了蒸馏过程,并使其易于集成到现有管道中。
- 优势:与现有方法相比,TeEFusion更简单、更高效,并且能够处理复杂的采样策略。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在SD3等最先进的模型上进行了广泛的实验,包括美学评分、对象组合和提示跟随能力。
- 性能提升:TeEFusion在美学评分、对象组合和提示跟随能力方面显著优于基线方法。
- 对比结果:与教师模型相比,TeEFusion的推理速度提高了6倍,同时保持了图像质量。
问题4:这个研究的实际应用价值是什么?
- 应用场景:适用于需要高效图像生成的场景,如电子商务、数字艺术等。
- 实施建议:TeEFusion易于实现和集成,可以快速部署到现有系统中。
- 局限与展望:TeEFusion在处理某些语义不一致的情况下可能表现不佳,未来工作将集中于解决这些问题。
来源
机器可读索引:llms.txt