通过少量梯度优化实现扩散模型高效剪枝,速度提升4.4倍且无精度损失。
DiP-GO: A Diffusion Pruner via Few-step Gradient Optimization
- 将剪枝转化为可微的子网络搜索,利用相邻步骤特征相似性设计智能剪枝器。
- 在SD-1.5上实现4.4倍推理加速,且生成质量保持不变。
- 无需重训练,适合资源受限场景下的扩散模型部署。
扩散模型在图像生成领域取得了显著进展,但其推理需经过多步去噪过程,计算开销大。传统剪枝方法虽可优化模型,但重训练依赖大规模数据和高算力,难以高效实施。近期研究尝试利用相邻去噪阶段特征相似性,采用简单静态策略降低计算量,但未能充分挖掘时序特征模式潜力。本文提出一种新型剪枝方法DiP-GO,通过可微分的智能剪枝器构建高效扩散模型。核心思想是将剪枝过程建模为子网络搜索:首先基于标准扩散模型引入备份连接构成超网(SuperNet),再设计插件式剪枝网络与优化损失函数以识别冗余计算;最终通过少步梯度优化与简单后处理获得最优子网。在Stable Diffusion系列及DiTs等模型上进行大量实验,DiP-GO在SD-1.5上实现4.4倍加速,且精度无损,显著优于现有最先进方法。
原文摘要 · Abstract (English)
Diffusion models have achieved remarkable progress in the field of image generation due to their outstanding capabilities. However, these models require substantial computing resources because of the multi-step denoising process during inference. While traditional pruning methods have been employed to optimize these models, the retraining process necessitates large-scale training datasets and extensive computational costs to maintain generalization ability, making it neither convenient nor efficient. Recent studies attempt to utilize the similarity of features across adjacent denoising stages to reduce computational costs through simple and static strategies. However, these strategies cannot fully harness the potential of the similar feature patterns across adjacent timesteps. In this work, we propose a novel pruning method that derives an efficient diffusion model via a more intelligent and differentiable pruner. At the core of our approach is casting the model pruning process into a SubNet search process. Specifically, we first introduce a SuperNet based on standard diffusion via adding some backup connections built upon the similar features. We then construct a plugin pruner network and design optimization losses to identify redundant computation. Finally, our method can identify an optimal SubNet through few-step gradient optimization and a simple post-processing procedure. We conduct extensive experiments on various diffusion models including Stable Diffusion series and DiTs. Our DiP-GO approach achieves 4.4 x speedup for SD-1.5 without any loss of accuracy, significantly outperforming the previous state-of-the-art methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。