Masked Diffusion Models Are Fast Distribution Learners

Jiachen Lei, Qinglong Wang, Peng Cheng, Zhongjie Ba, Zhan Qin +3 more
6/20/2023
9 citations
cs.CVcs.AIcs.LG
diffusion-flow

Official code: jiachenlei/maskdm (23 stars, Python, MIT, last commit 2023-11-09).

Abstract

Diffusion model has emerged as the \emph{de-facto} model for image generation, yet the heavy training overhead hinders its broader adoption in the research community. We observe that diffusion models are commonly trained to learn all fine-grained visual information from scratch.

Show full abstract

This paradigm may cause unnecessary training costs hence requiring in-depth investigation. In this work, we show that it suffices to train a strong diffusion model by first pre-training the model to learn some primer distribution that loosely characterizes the unknown real image distribution. Then the pre-trained model can be fine-tuned for various generation tasks efficiently. In the pre-training stage, we propose to mask a high proportion (e.g., up to 90\%) of input images to approximately represent the primer distribution and introduce a masked denoising score matching objective to train a model to denoise visible areas. In subsequent fine-tuning stage, we efficiently train diffusion model without masking. Utilizing the two-stage training framework, we achieves significant training acceleration and a new FID score record of 6.27 on CelebA-HQ $256 \times 256$ for ViT-based diffusion models. The generalizability of a pre-trained model further helps building models that perform better than ones trained from scratch on different downstream datasets. For instance, a diffusion model pre-trained on VGGFace2 attains a 46\% quality improvement when fine-tuned on a different dataset that contains only 3000 images. Our code is available at \url{https://github.com/jiachenlei/maskdm}.

View on arXivView PDF

Code Implementations(1)

jiachenlei/maskdmOfficial100%
MIT
232PythonApr 3, 20233 years agoMIT

Similar Papers

Cite this paper

@article{lei2023masked,
  title  = {Masked Diffusion Models Are Fast Distribution Learners},
  author = {Jiachen Lei and Qinglong Wang and Peng Cheng and Zhongjie Ba and Zhan Qin and Zhibo Wang and Zhenguang Liu and Kui Ren},
  year   = {2023},
  eprint = {2306.11363},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.11363v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.11363.svg)](https://codeofpaper.com/paper/2306.11363)

Discussion