A-SDM:通过模型组装与特征继承策略加速 Stable Diffusion
A-SDM: Accelerating Stable Diffusion through Model Assembly and Feature Inheritance Strategies
AI总结:
本文针对 Stable Diffusion 计算冗余问题,提出模型组装蒸馏与多级特征继承策略,分别实现 22.4% 和 40.0% 的生成加速。
摘要:
Stable Diffusion 模型(SDM)是一种广泛使用且有效的文本到图像(T2I)和图像到图像(I2I)生成模型。尽管已有多种采样器优化、模型蒸馏和网络量化尝试,但这些方法通常保留原始网络架构。庞大的参数规模和大量计算需求限制了对调整模型架构的研究。本研究聚焦于减少 SDM 中的冗余计算,并通过需要微调与无需微调两类方法优化模型。1)对于需要微调的方法,我们设计了一种模型组装策略,通过蒸馏重建轻量级模型,同时保持性能。其次,为缓解剪枝导致的性能损失,我们在压缩后的 UNet 中引入多专家条件卷积(ME-CondConv),通过在不牺牲速度的情况下提升容量来增强网络性能。第三,我们验证了用于提升网络速度的多 UNet 切换方法的有效性。2)对于无需微调的方法,我们提出一种特征继承策略,通过在网络结构内的块、层或单元级别跳过局部计算来加速推理。我们还在时间步级别考察了特征继承的多种采样模式。实验表明,所提出的需要微调和无需微调方法均能提升 SDM 的速度和性能。由模型组装策略重建的轻量级模型将生成速度提高了 22.4%,而特征继承策略将 SDM 生成速度提高了 40.0%。
英文摘要:
The Stable Diffusion Model (SDM) is a prevalent and effective model for text-to-image (T2I) and image-to-image (I2I) generation. Despite various attempts at sampler optimization, model distillation, and network quantification, these approaches typically maintain the original network architecture. The extensive parameter scale and substantial computational demands have limited research into adjusting the model architecture. This study focuses on reducing redundant computation in SDM and optimizes the model through both tuning and tuning-free methods. 1) For the tuning method, we design a model assembly strategy to reconstruct a lightweight model while preserving performance through distillation. Second, to mitigate performance loss due to pruning, we incorporate multi-expert conditional convolution (ME-CondConv) into compressed UNets to enhance network performance by increasing capacity without sacrificing speed. Third, we validate the effectiveness of the multi-UNet switching method for improving network speed. 2) For the tuning-free method, we propose a feature inheritance strategy to accelerate inference by skipping local computations at the block, layer, or unit level within the network structure. We also examine multiple sampling modes for feature inheritance at the time-step level. Experiments demonstrate that both the proposed tuning and the tuning-free methods can improve the speed and performance of the SDM. The lightweight model reconstructed by the model assembly strategy increases generation speed by $22.4%$, while the feature inheritance strategy enhances the SDM generation speed by $40.0%$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。