Lune

NeurIPS2022Top-tier venue

Efficient Spatially Sparse Inference for Conditional GANs and Diffusion Models

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

Abstract

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 <inline-formula><tex-math notation="LaTeX">3.0×3.0\times</tex-math><alternatives>mml:mathmml:mrowmml:mn3</mml:mn>mml:mo.</mml:mo>mml:mn0</mml:mn>mml:mo×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="li-ieq1-3316020.gif"/></alternatives></inline-formula> on NVIDIA RTX 3090 and <inline-formula><tex-math notation="LaTeX">4.6×4.6\times</tex-math><alternatives>mml:mathmml:mrowmml:mn4</mml:mn>mml:mo.</mml:mo>mml:mn6</mml:mn>mml:mo×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="li-ieq2-3316020.gif"/></alternatives></inline-formula> on Apple M1 Pro GPU, Stable Diffusion by <inline-formula><tex-math notation="LaTeX">7.2×7.2\times</tex-math><alternatives>mml:mathmml:mrowmml:mn7</mml:mn>mml:mo.</mml:mo>mml:mn2</mml:mn>mml:mo×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="li-ieq3-3316020.gif"/></alternatives></inline-formula> on 3090, and GauGAN by <inline-formula><tex-math notation="LaTeX">5.6×5.6\times</tex-math><alternatives>mml:mathmml:mrowmml:mn5</mml:mn>mml:mo.</mml:mo>mml:mn6</mml:mn>mml:mo×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="li-ieq4-3316020.gif"/></alternatives></inline-formula> on 3090 and <inline-formula><tex-math notation="LaTeX">5.2×5.2\times</tex-math><alternatives>mml:mathmml:mrowmml:mn5</mml:mn>mml:mo.</mml:mo>mml:mn2</mml:mn>mml:mo×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="li-ieq5-3316020.gif"/></alternatives></inline-formula> on M1 Pro GPU. Compared to our conference paper, we enhance SIGE to accommodate attention layers and apply it to Stable Diffusion. Additionally, we offer support for Apple M1 Pro GPU and include more results to substantiate the efficacy of our method.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

27 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Q-Diffusion: Quantizing Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Q-Diffusion: Quantizing Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
  • Q-Diffusion: Quantizing Diffusion Models cites Denoising Diffusion Probabilistic Models
  • Q-Diffusion: Quantizing Diffusion Models cites Denoising Diffusion Implicit Models
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Probabilistic Models
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Implicit Models
  • Video World Models with Long-term Spatial Memory cites Diffusion Models Beat GANs on Image Synthesis
  • Video World Models with Long-term Spatial Memory cites Denoising Diffusion Probabilistic Models
  • SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds cites Q-Diffusion: Quantizing Diffusion Models
  • SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds cites High-Resolution Image Synthesis with Latent Diffusion Models
  • SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds cites Diffusion Models Beat GANs on Image Synthesis
  • SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds cites Denoising Diffusion Implicit Models
  • Diffusion Models Beat GANs on Image Synthesis cites Denoising Diffusion Probabilistic Models
  • Diffusion Models Beat GANs on Image Synthesis cites Denoising Diffusion Implicit Models
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites Q-Diffusion: Quantizing Diffusion Models
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites Denoising Diffusion Probabilistic Models
  • Multiscale Structure Guided Diffusion for Image Deblurring cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Multiscale Structure Guided Diffusion for Image Deblurring cites Diffusion Models Beat GANs on Image Synthesis
  • Multiscale Structure Guided Diffusion for Image Deblurring cites Denoising Diffusion Probabilistic Models
  • Multiscale Structure Guided Diffusion for Image Deblurring cites Denoising Diffusion Implicit Models
  • Denoising Diffusion Implicit Models cites Denoising Diffusion Probabilistic Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers27

  1. SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two SecondsYanyu Li, Huan Wang, Qing Jin, Ju Hu et al.NeurIPS 2023 · 300 citations
  2. Q-Diffusion: Quantizing Diffusion ModelsXiuyu Li, Yijiang Liu, Long Lian, Huanrui Yang et al.ICCV 2023 · 279 citations
  3. Video World Models with Long-term Spatial MemoryTong Wu, Shuai Yang, Ryan Po, Yinghao Xu et al.NeurIPS 2025 · 145 citations
  4. Multiscale Structure Guided Diffusion for Image DeblurringMengwei Ren, Mauricio Delbracio, Hossein Talebi, Guido Gerig et al.ICCV 2023 · 120 citations
  5. Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video GenerationXingyang Li, Muyang Li, Tianle Cai, Haocheng Xi et al.NeurIPS 2025 · 66 citations

Builds on41

  1. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
  2. Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
  3. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  4. Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
  5. Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations

Related papers

  1. Accelerating Text-to-Image Editing via Cache-Enabled Sparse Diffusion InferenceZihao Yu, Haoyang Li, Fangcheng Fu, Xupeng Miao et al.AAAI 2024 · 19 citations
  2. FlashPS: Efficient Generative Image Editing with Mask-aware Caching and SchedulingXiaoxiao Jiang, Suyi Li, Lingyun Yang, Tianyu Feng et al.EuroSys 2026
  3. RegionE: Adaptive Region-Aware Generation for Efficient Image EditingPengtao Chen, Xianfang Zeng, Maosen Zhao, Mingzhu Shen et al.ICLR 2026 · 5 citations
  4. Entropy-Aware Dynamic KV Cache Sparsification for Autoregressive Image Generation and EditingTong Tong, LING XING, Linjie Li, Rui Yan et al.ICML 2026
  5. Revisiting Redundancy in Diffusion Transformers: A Temporal-Spatial Joint Caching Strategy for Efficient SamplingChenxi Du, Yongheng Deng, Ju Ren, Yaoxue ZhangKDD 2026
Dusk over the sea between two cliffs drawn in fine vertical lines