This paper introduces CMQuant, the first framework to achieve effective 4-bit quantization (for both weights and activations) in Consistency Models (CMs). By addressing the unique ways quantization errors compound during iterative sampling, the authors enable massive models like FLUX to run with a 75% smaller memory footprint and up to 3.4x higher throughput while actually improving image quality over existing methods.
What Problem Does This Paper Address?
Diffusion models have revolutionized image generation, but they are notoriously slow because they require dozens of iterative steps to "denoise" an image. Consistency Models (CMs) were designed to solve this by learning to map noise directly to an image in just 1–4 steps.
However, CMs have a "last mile" problem: while they require fewer steps, each individual step is still computationally heavy, and the models themselves are massive (e.g., the FLUX model requires ~23GB of VRAM in FP16 precision). Standard compression techniques like quantization—which reduces the precision of numbers from 16-bit to 4-bit—usually fail for CMs. This is because small quantization errors in the first step act as "bad inputs" for the next step, causing errors to explode exponentially across the trajectory. Furthermore, standard fine-tuning methods like LoRA (Low-Rank Adaptation) often clash with the noise introduced by quantization, leading to poor convergence.
Methods
CMQuant tackles these issues through a three-pronged "Quantization-Aware" approach:
- Trajectory Distillation with Phased Targets (TDPT): Instead of forcing the quantized model to match a high-precision "teacher" model at every step, TDPT uses different targets for different stages. In early iterations, it uses the output of the untrained quantized model as the target. This prevents the model from trying to fit "unattainable" high-precision targets in a noisy low-bit space, effectively resetting the error accumulation at the start of the sampling process.
- Hessian-Guided SVD-Initialized LoRA (HGS-LoRA): The authors use the Hessian matrix (which measures how sensitive the model's output is to changes in specific weights) to guide a Singular Value Decomposition (SVD). They freeze the "principal components" that are most sensitive to quantization and use the remaining components to initialize LoRA. This ensures that model updates follow "quantization-friendly" paths.
- Quantization-Aware Rank Adaptation (QRA): Not all layers in a neural network are equally important. QRA adaptively assigns higher LoRA ranks to layers that show high variation in activations or weights, and lower ranks to stable layers. This optimizes the parameter budget without increasing the total number of trainable parameters.
Datasets
The authors evaluated CMQuant across several popular generative models (SD1.5, SDXL, and FLUX-1.0) using the following:
- Training: The Laion-5B High-Res dataset.
- Evaluation: The MS-COCO-10K and MS-COCO-5K validation sets.
- Metrics: They used standard image quality metrics like FID (Frechet Inception Distance), PickScore (human preference alignment), and IC (Image Complexity), alongside CLIP scores for semantic alignment.
Key Insights and Ideas
- The "Synergistic" Error Effect: The paper highlights that quantization error isn't just additive; it interacts with the inherent trajectory fitting errors of CMs. A small error at $t$ becomes a massive deviation at $t-1$.
- Quantization as a "Local Manifold": The success of TDPT suggests that for low-bit models, it is better to build a "self-consistent local trajectory" within the 4-bit space during early steps rather than trying to mimic a high-precision trajectory that the 4-bit weights simply cannot represent.
- Sensitivity-Driven Fine-Tuning: By using the Hessian to identify "quantization-sensitive" weights, the authors prove that we don't need to fine-tune everything—we just need to protect the parts of the model that the quantization process hurts the most.
Key Results
CMQuant demonstrates significant improvements in both efficiency and quality:
- Performance on FLUX: It outperformed state-of-the-art (SOTA) methods on FLUX, improving the FID score by 4.74 and PickScore by 11.61.
- Hardware Efficiency: On an NVIDIA A100, CMQuant improved throughput by 1.71x on SDXL and 3.43x on FLUX.
- Memory Savings: The 4-bit quantization reduced memory usage to only 25–27% of the original FP16 models.
- Cross-Domain Utility: Interestingly, the authors applied the HGS-LoRA and QRA components to LLaMA3-8B (a large language model) and found it achieved faster loss decline and lower convergence loss than standard LoRA, suggesting the framework has applications beyond image generation.
Limitations and Future Work
- SD1.5 Sensitivity: The authors noted that the older SD1.5 model (which uses a UNet architecture) is more sensitive to quantization than the newer Transformer-based models like FLUX. While CMQuant performed well, it didn't lead in every single metric (like PickScore) on SD1.5.
- LLM Integration: While the preliminary results on LLaMA3 are promising, the full TDPT module (the trajectory distillation part) is specific to iterative models like CMs. Future work could explore how to adapt the phased-target logic to other iterative tasks in NLP.
- Dataset Scaling: The current training was done on Laion-5B; exploring how these quantization-aware techniques scale with even larger, more diverse datasets remains an open question.
Summary updated