TL;DR
Standard pruning methods for diffusion models treat all pixels equally, often destroying the main subject of an image at high compression ratios. This paper introduces an importance-aware pruning framework that uses spatial guidance signals—like classifier-free guidance (CFG) or edge detection—to preferentially preserve parameters critical to semantically important image regions. The result is a training-free, one-shot compression technique that maintains high visual fidelity and structural integrity even at 50-60% sparsity.
What Problem Does This Paper Address?
Large-scale diffusion models (like Stable Diffusion 3 and PixArt-$\Sigma$) produce stunning imagery but contain billions of parameters, making them computationally expensive and slow during inference. To deploy them on consumer hardware, model pruning is essential.
State-of-the-art, training-free pruning methods like OBS-Diff rely on the Optimal Brain Surgeon (OBS) framework, which minimizes the uniform reconstruction error across the entire image space. However, this approach treats background pixels (like grass or sky) with the same importance as foreground subjects (like faces or distinct objects). At high compression ratios (high sparsity), this uniform treatment causes severe structural degradation and artifacts on the primary subjects, rendering the generated images unusable.
Methods
The authors propose Importance-Aware OBS Pruning, a framework that biases pruning decisions toward parameters that affect perceptually critical regions.
Instead of minimizing standard layer-wise reconstruction error, they introduce a spatial weighting map $A_t$ into the objective function:
$$\hat{W}_l^* = \arg\min_{\hat{W}_l} \sum_{t=1}^T \alpha_t \| A_t \odot (\hat{W}_l X_{l,t} - W_l X_{l,t}) \|_2^2$$
For linear layers, because the weight matrix acts independently of the spatial dimension, the authors elegantly rewrite this objective by defining importance-filtered activations:
$$X'_{l,t} = A_t \odot X_{l,t}$$
This allows them to compute an importance-aware Hessian matrix ($H_{l,imp}$) using these filtered activations. The beauty of this approach is that it requires no changes to the underlying OBS pipeline or its computational complexity; it simply swaps out the standard activations for importance-weighted ones during Hessian construction.
Spatial Importance Signals
The framework is modular and can derive the importance map ($M_t$) from several sources:
- Classifier-Free Guidance (CFG) Delta: The difference between conditional and unconditional text predictions, which naturally highlights prompt-relevant regions.
- Canny Edge Detection: Focuses the model on preserving sharp structural boundaries and textures.
- Object Detection (YOLOv8): Explicitly bounds foreground objects to enforce object-centric preservation.
Datasets
- Calibration Phase: 1,000 samples from the GCC3M (Conceptual Captions) dataset were used to compute the activations and Hessians.
- Evaluation Phase: 1,000 prompts from the MS-COCO 2017 validation set were used to generate images for quantitative and qualitative benchmarking.
Key Insights and Ideas
- Perceptual Relevance > Uniform Error: Minimizing average pixel-wise loss is a sub-optimal metric for generative models. Human perception prioritizes foreground subject integrity over background perfection.
- CFG as a Free Saliency Map: Classifier-free guidance inherently acts as an attention mechanism, pinpointing exactly where the text prompt influences the denoising process. Leveraging it for pruning provides "free" semantic awareness.
- Modular Guidance Signals: Pruning can be tailored to specific deployment goals. If an application requires sharp text or architectural lines, Canny edge guidance can be plugged in; if it requires strict object fidelity, an object detector can be used instead.
Key Results
The authors evaluated their method on Stable Diffusion 3 (SD3) Medium and PixArt-$\Sigma$ using both structured and unstructured pruning. They compared their approach against the state-of-the-art OBS-Diff baseline using metrics like CLIP Score (text alignment), ImageReward (human preference), and MUSIQ (image quality).
- High Sparsity Resilience: At 60% unstructured sparsity on PixArt-$\Sigma$, the proposed CFG-guided method achieved an ImageReward score of 0.52 and a MUSIQ score of 67.13, significantly outperforming OBS-Diff (0.49 and 65.24, respectively).
- Structured Pruning Gains: In structured pruning settings at 40% sparsity, OBS-Diff's performance collapsed to an ImageReward of -0.04, while the proposed importance-aware method maintained a score of 0.30.
Qualitatively, as shown in the motorcycle example below, the importance-aware approach preserves the essential geometry and fine-grained textures of the subject, whereas the baseline method suffers from severe structural collapse.
Limitations and Future Work
- Signal Dependency: The framework's success depends heavily on the quality of the importance signal. For highly abstract prompts or heavily cluttered scenes, CFG masks can become noisy or incomplete.
- Post-Training Only: The method is strictly post-training and does not explore whether brief recovery fine-tuning could push compression ratios even higher.
- Hardware Support: For unstructured pruning, actual latency and speedups still depend on specialized hardware or sparse-kernel engine support.
- Domain Scope: The current evaluation is limited to text-to-image generation. Extending this concept to video diffusion, image editing, and personalization tasks remains an open direction for future research.
Summary updated