Diffusion models have revolutionized image super-resolution (SR), producing stunningly realistic details that traditional methods simply can't match. However, their massive computational appetite makes them nearly impossible to run on mobile devices or edge hardware. Even "one-step" diffusion models, designed for speed, remain bloated with billions of parameters.
PassionSR introduces a novel Post-Training Quantization (PTQ) framework that slashes the size and computational cost of these models by converting them to 8-bit or even 6-bit precision with almost no loss in visual quality.
TL;DR
PassionSR is a post-training quantization method that makes one-step diffusion super-resolution models efficient enough for mobile deployment. By using learnable boundaries and adaptive scaling, it achieves up to an 86% reduction in parameters and a 4× speedup while maintaining visual results comparable to full-precision 32-bit models.
What Problem Does This Paper Address?
While diffusion-based SR models are powerful, they suffer from two major deployment hurdles:
- High Latency: Standard diffusion requires multiple denoising steps. One-step diffusion (OSD) models solve this but are still massive (e.g., OSEDiff has over 1.3 billion parameters).
- Quantization Sensitivity: Simply rounding 32-bit floating-point numbers to 8-bit integers (quantization) usually breaks these models. OSD models have complex sub-modules and "imbalanced activation distributions"—essentially, extreme outlier values that make standard quantization noisy and inaccurate.
Previous quantization methods focused mostly on the UNet component, but in one-step models, the Variational Autoencoder (VAE) actually accounts for over 80% of the computational load. PassionSR is the first to tackle low-bit quantization for the entire OSDSR pipeline in a practical, efficient manner.
Methods
The authors propose a three-step strategy to slim down the model:
- Model Simplification: They first prune the OSDSR architecture (specifically OSEDiff) down to its two essential cores: the UNet and the VAE. By replacing complex auxiliary branches like the CLIPEncoder with constant embeddings, they reduce the initial parameter count by 27% without losing performance.
- Learnable Quantization Strategy:
- Learnable Boundary Quantizer (LBQ): Instead of using fixed clipping ranges, PassionSR learns the optimal upper and lower boundaries for each layer's data distribution.
- Learnable Equivalent Transformation (LET): To handle outliers, they introduce channel-wise scaling factors. These factors "smooth out" the activation spikes, making the data easier to quantize. Crucially, these scales are "folded" into the weights during inference, meaning they add zero extra computational cost at runtime.
- Distributed Quantization Calibration (DQC): Training quantized parameters can be unstable. DQC splits the calibration into two stages (Stage 1 for scaling, Stage 2 for boundaries). This stabilizes the process and accelerates convergence, achieving high-quality results in just one hour of calibration.
Datasets
The researchers used a mix of standard benchmarks to prove PassionSR's robustness:
- Calibration: 500 random image crops from the DIV2K training set.
- Evaluation: The model was tested on RealSR, DRealSR, and DIV2K_val. These datasets represent a variety of real-world and synthetic image degradations, ensuring the model generalizes well beyond lab conditions.
Key Insights and Ideas
- The VAE is the Real Bottleneck: In multi-step diffusion, the UNet is the heavy lifter. But in one-step models, the VAE is the primary consumer of FLOPs. PassionSR’s decision to quantize the VAE is what enables its massive speedups.
- Smoothing the Spikes: The "aha moment" for handling quantization noise is the activation distribution visualization. As seen in Figure 7, the original activations are wildly dispersed. The LET component effectively "squeezes" these distributions, making them "quantization-friendly."
- Stability via Distribution: By splitting the calibration into two stages (DQC), the authors found they could reduce GPU memory usage by over 10GB and cut calibration time by 75% compared to standard joint optimization.
Key Results
- Efficiency: Compared to the full-precision OSEDiff baseline, PassionSR (8-bit) achieves an 81.77% parameter reduction and a 76.56% reduction in operations (GOPs).
- Visual Fidelity: At 8-bit, PassionSR is virtually indistinguishable from the 32-bit original. Even at 6-bit, it maintains structural integrity where other leading quantization methods (like LSQ or Q-Diffusion) produce severe artifacts or complete failures.
- Quantitative Superiority: On the RealSR dataset, PassionSR (8-bit) achieved a PSNR of 25.67, actually slightly outperforming the full-precision baseline in some metrics due to the regularization effect of the calibration process.
Limitations and Future Work
While PassionSR excels at 8-bit and 6-bit quantization, the authors note that ultra-low bit-widths (e.g., 4-bit) still result in noticeable performance degradation for one-step diffusion models. The complex generative nature of these models makes 4-bit quantization an open challenge. Future work may involve exploring more advanced distillation techniques to bridge the gap for even more aggressive compression.
For more details, check out the full paper or the code at github.com/libozhu03/PassionSR.
Summary updated