/BinaryDM

This project is the official implementation of our “Towards Accurate Binarization of Diffusion Model”.

Primary LanguagePython

Towards Accurate Binarization of Diffusion Model

This implementation supports the paper "Towards Accurate Binarization of Diffusion Model". [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 under 4-bit activation quantization on LSUN-Bedrooms.

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{zheng2024accurate,
      title={Towards Accurate Binarization of Diffusion Model}, 
      author={Xingyu Zheng and Haotong Qin and Xudong Ma and Mingyuan Zhang and Haojie Hao and Jiakai Wang and Zixiang Zhao and Jinyang Guo and Xianglong Liu},
      year={2024},
      eprint={2404.05662},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}