TL;DR
Post-training pruning is a powerful way to compress large models without retraining, but popular methods designed for LLMs fail when applied to Diffusion Transformers (DiTs). This paper introduces DiT-Pruning, a training-free framework that balances weight and activation scales by squaring weight terms and dynamically adjusting pruning granularity based on layer-wise clustering patterns. The result is a massive reduction in computational overhead with virtually no loss in generated image quality, even at 50% sparsity.
What Problem Does This Paper Address?
Diffusion Transformers (DiTs)—such as PixArt and FLUX—have set new standards for high-fidelity image generation. However, their massive parameter sizes and iterative generation processes incur heavy computational overhead, making deployment on resource-constrained hardware difficult.
While post-training pruning (PTP) works wonders for Large Language Models (LLMs) by removing redundant weights without expensive retraining, directly applying LLM-centric pruning methods (like Wanda) to DiTs causes severe image degradation. The authors identify two core reasons for this failure:
- Scale Mismatch: DiT weights have significantly larger magnitudes than LLM weights, while DiTs operate on fewer tokens in latent space (resulting in smaller activation norms). LLM pruning metrics rely on linear approximations that accidentally amplify the dominance of these large weights, throwing off the balance between weight and activation importance.
- Structural Heterogeneity: Existing methods apply a uniform pruning granularity across all layers. This ignores the fact that different components in a DiT (such as attention layers versus adaptive layer normalization, or adaLN) exhibit completely different weight distribution patterns.
Methods
The authors propose DiT-Pruning, which introduces two main innovations to customize the pruning process for DiT architectures:
- Squared Transformation on Weights (STW): To fix the scale mismatch, the authors re-evaluate pruning metrics from an energy-based modeling perspective. They show that pruning loss actually grows quadratically with parameter magnitude. By squaring the weight term ($|W|^2$), STW restores this quadratic energy structure, effectively compressing the dominant DiT weight scale and balancing it against activation norms.
- Clustering-Aware Pruning Granularity (CAG): Instead of a one-size-fits-all approach, CAG dynamically adjusts the comparison groups used for pruning. By calculating a normalized heterogeneity metric ($G_{out}$), it identifies whether a layer has compact, isotropic weight patterns or elongated, channel-aligned clusters. Layers with compact patterns (like MLP and self-attention) are pruned globally at the per-layer level, while highly heterogeneous layers (like adaLN) are pruned at the per-channel level.
Datasets
The method was calibrated and evaluated using the following standard benchmarks:
- COCO (Common Objects in Context): 1,024 annotation prompts were used for calibration and text-to-image evaluation across different resolutions (256×256 and 512×512).
- ImageNet: Used to evaluate the classical DiT-XL/2 model, generating 10,000 images at 256×256 resolution.
- MJHQ-30K (specifically a 1,024-prompt subset of MJHQ-5K): Used to evaluate high-resolution text-to-image alignment and fidelity on state-of-the-art models like FLUX.1-dev.
Key Insights and Ideas
- LLM Pruning Metrics Don't Translate to DiTs: LLMs deal with massive token sequences, meaning activation norms heavily influence the saliency metric. DiTs operate with far fewer tokens, meaning weight magnitudes dominate. Linear approximations in popular metrics break down under the wider weight ranges of DiTs.
- Pruning as Energy Allocation: Viewing network pruning through the lens of classical mechanics (like Hooke's Law) reveals that loss increase behaves like perturbation energy. This justifies why squaring the weights provides a more theoretically sound and stable saliency metric.
- Not All Layers Are Created Equal: The discovery of distinct clustering patterns in the 2D weight space means uniform sparsity allocation is inherently suboptimal. AdaLN layers require fine-grained, per-channel pruning to preserve their strong channel-wise heterogeneity, whereas attention layers benefit from broader per-layer pruning.
Key Results
- FLUX.1-dev Excellence: At 50% sparsity on the MJHQ dataset (512×512 resolution), DiT-Pruning achieved a mere 0.001 loss in CLIP score, drastically outperforming Wanda and Magnitude pruning, which suffered severe visual degradation.
- DiT-XL/2 on ImageNet: Under 50% sparsity and 250 sampling steps, standard magnitude pruning and Wanda increased the FID score (where lower is better) by 36.73 and 40.64, respectively. DiT-Pruning incurred an FID increase of only 8.53.
- Efficiency Gains: DiT-Pruning requires zero retraining or fine-tuning. At 50% unstructured or 2:4 structured sparsity, it translates directly into a ~1.6x practical inference speedup and significantly reduces the model's memory footprint.
Limitations and Future Work
- Extreme Sparsity Breakdown: While the method shines at up to 50% sparsity, pushing the model to extreme sparsity levels (70% or 80%) introduces noticeable visual artifacts, reduced fidelity, and inaccurate semantics.
- Sensitivity to Timesteps: DiTs are highly sensitive to the diffusion timesteps chosen during calibration. The authors note that a broad coverage of timesteps is required, indicating that future work could better exploit time-dependent denoising dynamics.
- Domain Diversity: The evaluation focused primarily on standard image generation benchmarks; its robustness across more diverse or niche visual domains remains to be tested.
Summary updated