DilateQuant: Accurate and Efficient Diffusion Quantization via Weight Dilation
<|reference_start|>DilateQuant: Accurate and Efficient Diffusion Quantization via Weight Dilation: Diffusion models have shown excellent performance on various image generation tasks, but the substantial computational costs and huge memory footprint hinder their low-latency applications in real-world scenarios. Quantization is a promising way to compress and accelerate models. Nevertheless, due to the wide range and time-varying activations in diffusion models, existing methods cannot maintain both accuracy and efficiency simultaneously for low-bit quantization. To tackle this issue, we propose DilateQuant, a novel quantization framework for diffusion models that offers comparable accuracy and high efficiency. Specifically, we keenly aware of numerous unsaturated in-channel weights, which can be cleverly exploited to reduce the range of activations without additional computation cost. Based on this insight, we propose Weight Dilation (WD) that maximally dilates the unsaturated in-channel weights to a constrained range through a mathematically equivalent scaling. WD costlessly absorbs the activation quantization errors into weight quantization. The range of activations decreases, which makes activations quantization easy. The range of weights remains constant, which makes model easy to converge in training stage. Considering the temporal network leads to time-varying activations, we design a Temporal Parallel Quantizer (TPQ), which sets time-step quantization parameters and supports parallel quantization for different time steps, significantly improving the performance and reducing time cost. To further enhance performance while preserving efficiency, we introduce a Block-wise Knowledge Distillation (BKD) to align the quantized models with the full-precision models at a block level. The simultaneous training of time-step quantization parameters and weights minimizes the time required, and the shorter backpropagation paths decreases the memory footprint of the quantization process.<|reference_end|>
@article{liu2024dilatequant:,
    title={DilateQuant: Accurate and Efficient Diffusion Quantization via Weight
  Dilation},
    author={Xuewen Liu, Zhikai Li, Qingyi Gu},
    journal={arXiv preprint arXiv:2409.14307},
    year={2024},
    archivePrefix={arXiv},
    eprint={2409.14307},
    primaryClass={cs.CV cs.AI}
}