This implementation supports the paper "BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models". [PDF]
Establish a virtual environment and install dependencies as referred to latent-diffusion.
- Replace the existing
main.pyin the LDM with our version ofmain.py. - Place
openaimodel_ours.pyandours_util.pyin the directory./ldm/modules/diffusionmodules. - Place
ddpm_ours.pyin the directory./ldm/models/diffusion - run
bash train.sh
- Results for LDM-4 on LSUN-Bedrooms in unconditional generation by DDIM with 100 steps.
- Samples generated by the binarized DM baseline and BinaryDM under W1A4 bit-width.
- Our codebase builds on latent-diffusion and stable-diffusion. Thanks for open-sourcing!
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},
}


