Awesome
BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models
This implementation supports the paper "BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models". [PDF]
<img src="imgs/main.png" alt="main" style="zoom: 30%;" />Requirements
Establish a virtual environment and install dependencies as referred to latent-diffusion.
Usage
- Replace the existing
main.py
in the LDM with our version ofmain.py
. - Place
openaimodel_ours.py
andours_util.py
in the directory./ldm/modules/diffusionmodules
. - Place
ddpm_ours.py
in the directory./ldm/models/diffusion
- run
bash train.sh
Main Results
- Results for LDM-4 on LSUN-Bedrooms in unconditional generation by DDIM with 100 steps.
Visualization Results
- Samples generated by the binarized DM baseline and BinaryDM under W1A4 bit-width.
Comments
- Our codebase builds on latent-diffusion and stable-diffusion. Thanks for open-sourcing!
BibTeX
If you find BinaryDM is useful and helpful to your work, please kindly cite this paper:
@misc{zheng2024binarydmaccurateweightbinarization,
title={BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models},
author={Xingyu Zheng and Xianglong Liu and Haotong Qin and Xudong Ma and Mingyuan Zhang and Haojie Hao and Jiakai Wang and Zixiang Zhao and Jinyang Guo and Michele Magno},
year={2024},
eprint={2404.05662},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2404.05662},
}