arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.02048cs.CVcs.GRcs.LG
收藏

条件GAN与扩散模型的高效空间稀疏推理

Efficient Spatially Sparse Inference for Conditional GANs and Diffusion Models

Massachusetts Institute of Technology(麻省理工学院);Stanford University(斯坦福大学);Carnegie Mellon University(卡内基梅隆大学)

Muyang Li, Ji Lin, Chenlin Meng, Stefano Ermon, Song Han, Jun-Yan Zhu

AI总结:

提出空间稀疏推理(SSI)和稀疏增量生成引擎(SIGE),通过缓存并重用未编辑区域特征,仅对编辑区域计算,在现成硬件上显著加速条件GAN与扩散模型的图像编辑。

摘要:

在图像编辑中,现有的深度生成模型倾向于从头重新合成整个输出,包括未编辑的区域。这导致了计算的大量浪费,尤其是对于微小的编辑操作。在这项工作中,我们提出了空间稀疏推理(SSI),这是一种通用技术,可选择性地对编辑区域执行计算,并加速各种生成模型,包括条件GAN和扩散模型。我们的关键观察是,用户倾向于逐步编辑输入图像。这促使我们缓存并重用原始图像的特征图。给定一张编辑后的图像,我们将卷积滤波器稀疏地应用于编辑区域,同时对未编辑区域重用缓存的特征。基于我们的算法,我们进一步提出了稀疏增量生成引擎(SIGE),以在现成硬件上将计算量的减少转化为延迟的降低。在约1%面积的编辑下,SIGE在NVIDIA RTX 3090上将DDPM加速了3.0倍,在Apple M1 Pro GPU上加速了4.6倍;在3090上将Stable Diffusion加速了7.2倍;在3090上将GauGAN加速了5.6倍,在M1 Pro GPU上加速了5.2倍。与我们的会议版本相比,我们扩展了SIGE以适应注意力层,并将其应用于Stable Diffusion。此外,我们提供了对Apple M1 Pro GPU的支持,并包含了更多关于大范围和连续编辑的结果。

英文摘要:

During image editing, existing deep generative models tend to re-synthesize the entire output from scratch, including the unedited regions. This leads to a significant waste of computation, especially for minor editing operations. In this work, we present Spatially Sparse Inference (SSI), a general-purpose technique that selectively performs computation for edited regions and accelerates various generative models, including both conditional GANs and diffusion models. Our key observation is that users prone to gradually edit the input image. This motivates us to cache and reuse the feature maps of the original image. Given an edited image, we sparsely apply the convolutional filters to the edited regions while reusing the cached features for the unedited areas. Based on our algorithm, we further propose Sparse Incremental Generative Engine (SIGE) to convert the computation reduction to latency reduction on off-the-shelf hardware. With about $1\%$-area edits, SIGE accelerates DDPM by $3.0\times$ on NVIDIA RTX 3090 and $4.6\times$ on Apple M1 Pro GPU, Stable Diffusion by $7.2\times$ on 3090, and GauGAN by $5.6\times$ on 3090 and $5.2\times$ on M1 Pro GPU. Compared to our conference version, we extend SIGE to accommodate attention layers and apply it to Stable Diffusion. Additionally, we offer support for Apple M1 Pro GPU and include more results with large and sequential edits.

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

↑