Abstract
Diffusion models (DMs) have revolutionized image generation but remain computationally expensive for deployment on resource-constrained edge devices. While model quantization offers a path toward efficiency, pushing precision down to 4-bit typically results in significant quality degradation. This paper introduces a novel 4-bit floating-point (FP) quantization framework specifically optimized for the unique characteristics of diffusion processes. By implementing Mixup-Sign Floating-Point (MSFP) quantization, Timestep-Aware LoRA (TALoRA), and Denoising-Factor Loss Alignment (DFA), the authors achieve state-of-the-art results, including near-lossless 6-bit performance and highly effective 4-bit generation on complex benchmarks like Stable Diffusion.
Introduction
Diffusion models are the backbone of modern generative AI, yet their high memory footprint and slow inference speeds pose significant barriers to mobile and edge deployment. Standard quantization techniques, which reduce precision from 32-bit to lower bit-widths, often struggle with the dynamic nature of the denoising process. Specifically, when moving to 4-bit precision, existing methods frequently fail to maintain image fidelity. This research identifies and addresses three fundamental bottlenecks: the inefficiency of signed quantization for asymmetric activation distributions, the varying computational requirements across different denoising timesteps, and the misalignment between standard training objectives and final perceptual quality in quantized models.
The Challenges of 4-Bit Diffusion Quantization
The authors identify three core reasons why traditional quantization fails to preserve quality at ultra-low bit-widths:
- Asymmetric Distributions: Many diffusion models utilize the SiLU activation function, which produces "half-normal" distributions where the majority of values are positive. Standard signed FP quantization allocates a bit for the sign regardless of the distribution, effectively wasting precision that could otherwise be used to represent data magnitude.
- Temporal Complexity: The denoising process is inherently multi-stage. Early timesteps focus on global structure and layout, while later steps refine fine-grained textures and details. A static quantization or fine-tuning strategy fails to account for these distinct "tasks."
- Loss Mismatch: The standard Mean Squared Error (MSE) loss on predicted noise does not correlate perfectly with final image quality, especially when quantization errors vary in impact across different stages of the diffusion trajectory.
Proposed Methodology
To overcome these hurdles, the framework introduces three integrated components:
Mixup-Sign Floating-Point Quantization (MSFP)
Recognizing the "wasted bit" in asymmetric layers, the researchers developed MSFP. This scheme categorizes layers into "Normal" (symmetric) and "Anomalous" (asymmetric). For anomalous layers, the framework employs unsigned FP quantization with a learned zero point. This approach reclaims the sign bit, doubling the representable resolution for the dominant positive values without increasing the overall bit-width.
Timestep-Aware LoRA (TALoRA)
Rather than applying a single Low-Rank Adapter (LoRA) to the entire denoising sequence, the authors propose a "LoRA Hub." This hub contains multiple adapters managed by a learnable Shared Router. The router dynamically selects the most appropriate adapter based on the current timestep, allowing the model to specialize its weights for different stages of the generation process (e.g., structural outlining vs. detail refinement).
Denoising-Factor Loss Alignment (DFA)
To better align the fine-tuning process with visual output, the authors modified the loss function using a denoising factor ($\gamma_t$). This factor scales the loss according to the specific timestep's influence on the final image. By prioritizing learning in timesteps where quantization error is most detrimental to quality, DFA ensures more efficient use of the model's limited bit-budget.
Experimental Results
The framework was rigorously tested across benchmarks including CIFAR-10, CelebA, LSUN, ImageNet, and MS-COCO (using Stable Diffusion).
- State-of-the-Art Accuracy: On CIFAR-10, the 4-bit FP model achieved a Fréchet Inception Distance (FID) of 6.10, a massive improvement over previous 4-bit fine-tuning methods like EfficientDM (FID 38.40).
- Scalability: At 6-bit precision, the model's performance becomes virtually indistinguishable from the full 32-bit floating-point baseline.
- Stable Diffusion Performance: The method successfully quantized Stable Diffusion to 4-bit and 6-bit levels. Unlike previous 4-bit attempts that often produced incoherent outputs, this framework maintained high visual fidelity and strict adherence to complex text prompts.
Conclusion
This work demonstrates that 4-bit quantization for diffusion models is not only possible but highly effective when the unique mathematical and temporal properties of the denoising process are considered. By moving from rigid integer-based quantization to a flexible, timestep-aware floating-point approach, the authors have set a new standard for efficient generative AI. Future work may extend these insights to Diffusion Transformers (DiTs) and explore the limits of even lower bit-widths, such as 2-bit quantization.
Summary updated