arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.02852cs.CV
收藏

可学习的稀疏性用于视觉生成模型

Learnable Sparsity for Vision Generative Models

National University of Singapore(新加坡国立大学);RWTH Aachen University(亚琛工业大学);University of Oxford(牛津大学)

Yang Zhang, Er Jin, Wenzhong Liang, Yanfei Dong, Ashkan Khakzar, Philip Torr, Johannes Stegmaier, Kenji Kawaguchi

AI总结:

本文提出了一种无需重新训练的扩散模型剪枝方法,通过学习可微掩码和时间步梯度检查点技术,实现高效参数压缩与性能保持。

摘要:

扩散模型在各种视觉任务中取得了显著进展。然而,这些进步往往依赖于增加模型规模,这会增加计算复杂度和内存需求,使部署变得复杂,提高推理成本,并造成环境影响。虽然一些研究探索了剪枝技术以提高扩散模型的内存效率,但大多数现有方法需要大量重新训练以保持模型性能。重新训练现代大型扩散模型非常昂贵且资源密集,这限制了这些方法的实用性。在本工作中,我们通过提出一个模型无关的结构剪枝框架,实现了无需重新训练的低成本扩散剪枝。该框架为扩散模型学习可微的掩码以稀疏化模型。为了确保有效的剪枝以保持最终去噪潜在的质量,我们设计了一个新颖的端到端剪枝目标,覆盖整个扩散过程。由于端到端剪枝是内存密集型的,我们进一步提出了时间步梯度检查点技术,该技术在优化过程中显著减少内存使用,使端到端剪枝能够在有限的内存预算内完成。在最先进的U-Net扩散模型SDXL和扩散变换器(FLUX)上的结果表明,我们的方法可以有效剪枝高达20%的参数,且最小的可感知性能降级,并且值得注意的是,无需模型重新训练。我们还展示了我们的方法仍能在时间步压缩的扩散模型上进行剪枝。

英文摘要:

Diffusion models have achieved impressive advancements in various vision tasks. However, these gains often rely on increasing model size, which escalates computational complexity and memory demands, complicating deployment, raising inference costs, and causing environmental impact. While some studies have explored pruning techniques to improve the memory efficiency of diffusion models, most existing methods require extensive retraining to retain the model performance. Retraining a modern large diffusion model is extremely costly and resource-intensive, which limits the practicality of these methods. In this work, we achieve low-cost diffusion pruning without retraining by proposing a model-agnostic structural pruning framework for diffusion models that learns a differentiable mask to sparsify the model. To ensure effective pruning that preserves the quality of the final denoised latent, we design a novel end-to-end pruning objective that spans the entire diffusion process. As end-to-end pruning is memory-intensive, we further propose time step gradient checkpointing, a technique that significantly reduces memory usage during optimization, enabling end-to-end pruning within a limited memory budget. Results on state-of-the-art U-Net diffusion models SDXL and diffusion transformers (FLUX) demonstrate that our method can effectively prune up to 20% parameters with minimal perceptible performance degradation, and notably, without the need for model retraining. We also showcase that our method can still prune on top of time step distilled diffusion models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑