arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.19897cs.CV
收藏

缩小文本到图像扩散模型的文本编码器

Scaling Down Text Encoders of Text-to-Image Diffusion Models

JD Explore Academy, JD.com Inc.(京东探索研究院);Georgia Institute of Technology(佐治亚理工学院)

Lifu Wang, Daqing Liu, Xinchen Liu, Xiaodong He

AI总结:

本文通过基于视觉的知识蒸馏缩小T5文本编码器,发现蒸馏后的T5-base模型在图像质量上与T5-XXL相当,但体积缩小50倍,显著降低了GPU需求,使高质量文本到图像生成更易访问。

摘要:

扩散模型中的文本编码器发展迅速,从CLIP过渡到了T5-XXL。尽管这一演进显著增强了模型理解复杂提示和生成文本的能力,但也导致参数数量大幅增加。尽管T5系列编码器在C4自然语言语料库上训练,该语料库包含大量非视觉数据,但带有T5编码器的扩散模型并不响应这些非视觉提示,这表明其表征能力存在冗余。因此,这引出了一个重要问题:“我们真的需要如此庞大的文本编码器吗?”为了寻求答案,我们采用基于视觉的知识蒸馏来训练一系列T5编码器模型。为了完全继承其能力,我们基于三个标准构建了数据集:图像质量、语义理解和文本渲染。我们的结果展示了缩小模式,即蒸馏后的T5-base模型可以生成与T5-XXL质量相当的图像,而模型大小却缩小了50倍。这种模型尺寸的减小显著降低了运行FLUX和SD3等最先进模型的GPU需求,使高质量文本到图像生成更加易于访问。

英文摘要:

Text encoders in diffusion models have rapidly evolved, transitioning from CLIP to T5-XXL. Although this evolution has significantly enhanced the models' ability to understand complex prompts and generate text, it also leads to a substantial increase in the number of parameters. Despite T5 series encoders being trained on the C4 natural language corpus, which includes a significant amount of non-visual data, diffusion models with T5 encoder do not respond to those non-visual prompts, indicating redundancy in representational power. Therefore, it raises an important question: "Do we really need such a large text encoder?" In pursuit of an answer, we employ vision-based knowledge distillation to train a series of T5 encoder models. To fully inherit its capabilities, we constructed our dataset based on three criteria: image quality, semantic understanding, and text-rendering. Our results demonstrate the scaling down pattern that the distilled T5-base model can generate images of comparable quality to those produced by T5-XXL, while being 50 times smaller in size. This reduction in model size significantly lowers the GPU requirements for running state-of-the-art models such as FLUX and SD3, making high-quality text-to-image generation more accessible.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑