SuperAPI AI Directory

SnapGen - A mobile text-to-image model jointly launched by Snap and HKUST and other institutions

Author: AI小集 · Original source: AI工具集

What is SnapGen

SnapGen is a text-to-image (T2I) diffusion model jointly launched by Snap Inc, the Hong Kong University of Science and Technology, the University of Melbourne, and other institutions. It can quickly generate high-resolution (1024×1024 pixels) images on mobile devices in just 1.4 seconds. The model achieves this performance with 379M parameters, significantly reducing model size and computational requirements, while reaching a high score of 0.66 on the GenEval metric, surpassing many larger-parameter SDXL and IF-XL models. SnapGen is based on technologies such as optimized network architecture, cross-architecture knowledge distillation, and adversarial step distillation to achieve efficient image generation on mobile devices.

SnapGen

SnapGen's main features

  • High-resolution image generation: Quickly generate high-resolution images up to 1024×1024 pixels on mobile devices.
  • Fast generation capability: Complete image generation within 1.4 seconds, significantly improving generation efficiency.
  • Optimized model size: The SnapGen model has only 379M parameters, surpassing larger-parameter models in image quality.
  • Cross-architecture knowledge distillation: Improve the generation quality of small models based on transferring knowledge from larger models.
  • Adversarial step distillation: Combine adversarial training and knowledge distillation to achieve the ability to generate high-quality images in a few steps.

SnapGen's technical principles

  • Network architecture optimization: Conduct an in-depth examination of the network architecture of the denoising UNet and autoencoder (AE) to obtain the best balance between latency and performance, reducing model parameters and computational complexity while maintaining image generation quality.
  • Multi-level knowledge distillation: Based on extracting knowledge from larger models across architectures, use a multi-level method to guide model training, achieving high-quality image generation while maintaining a smaller model size.
  • Timestep-aware scaling: During training, adopt timestep-aware scaling technology, combine multiple training objectives, and adapt to the prediction difficulty at different timesteps.
  • Adversarial training: Combine adversarial training and knowledge distillation to achieve fast high-quality image generation with a few-step teacher model.
  • Integrated adversarial guidance: During the knowledge distillation process, integrate adversarial guidance to further improve the quality and realism of generated images.
  • Efficient training techniques: Introduce improved training techniques, including flow matching as the objective and using logit-normal sampling during training, to improve training stability and generation quality.

SnapGen's project address

SnapGen's application scenarios

  • Social media content creation: Users quickly generate personalized images for posts or stories on social media platforms such as Snapchat.
  • Mobile app integration: Integrate SnapGen into mobile apps to provide users with the ability to create images on the spot, such as virtual fitting and filter effect previews.
  • Games and entertainment: Used for rapid generation of in-game assets, or to provide players in mobile games with the ability to customize characters and environments.
  • Education and training: Use SnapGen to generate images in teaching materials, such as scientific diagrams or historical scenes, enhancing the learning experience.
  • News and media: Journalists and media workers quickly generate images needed in news reports, improving the attractiveness and expressiveness of the reports.