/BinaryDM

This project is the official implementation of our “BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models”.

Primary LanguagePython

BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models

This implementation supports the paper "BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models". [PDF]

main

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 of main.py.
  • Place openaimodel_ours.py and ours_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.

table

Visualization Results

  • Samples generated by the binarized DM baseline and BinaryDM under W1A4 bit-width.

samples

Comments

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}, 
}