Existing text-to-image (T2I) diffusion models face several limitations, including large model sizes, slow runtime, and low-quality generation on mobile devices. This paper aims to address all of these challenges by developing an extremely small and fast T2I model that generates high-resolution and high-quality images on mobile platforms. We propose several techniques to achieve this goal. First, we systematically examine the design choices of the network architecture to reduce model parameters and latency, while ensuring high-quality generation. Second, to further improve generation quality, we employ cross-architecture knowledge distillation from a much larger model, using a multi-level approach to guide the training of our model from scratch. Third, we enable a few-step generation by integrating adversarial guidance with knowledge distillation. For the first time, our model SnapGen, demonstrates the generation of 1024x1024 px images on a mobile device around 1.4 seconds. On ImageNet-1K, our model, with only 372M parameters, achieves an FID of 2.06 for 256x256 px generation. On T2I benchmarks (i.e., GenEval and DPG-Bench), our model with merely 379M parameters, surpasses large-scale models with billions of parameters at a significantly smaller size (e.g., 7x smaller than SDXL, 14x smaller than IF-XL).
翻译:现有的文本到图像(T2I)扩散模型存在若干局限性,包括模型尺寸庞大、运行速度慢以及在移动设备上生成质量低。本文旨在通过开发一种极其小巧且快速的T2I模型来解决所有这些挑战,该模型能够在移动平台上生成高分辨率、高质量的图像。我们提出了几种技术来实现这一目标。首先,我们系统地审视了网络架构的设计选择,以减少模型参数和延迟,同时确保高质量的生成。其次,为了进一步提升生成质量,我们采用了一种跨架构知识蒸馏方法,从一个更大的模型中,通过多层次的方法来指导我们模型从零开始的训练。第三,我们通过将对抗性引导与知识蒸馏相结合,实现了少步数生成。我们的模型SnapGen首次在移动设备上实现了约1.4秒内生成1024x1024像素的图像。在ImageNet-1K数据集上,我们的模型仅拥有3.72亿参数,在生成256x256像素图像时取得了2.06的FID分数。在T2I基准测试(即GenEval和DPG-Bench)上,我们仅拥有3.79亿参数的模型,在显著更小的尺寸下(例如,比SDXL小7倍,比IF-XL小14倍),超越了拥有数十亿参数的大规模模型。