arXiv:2505.20600cs.DCcs.AI2025-05被引 2

通过缓存与调度优化,让图像编辑速度提升至3倍且延迟降低14.7倍。

InstGenIE: Generative Image Editing Made Efficient with Mask-aware Caching and Scheduling

  • 利用掩码区域复用中间激活,跳过未修改区域的冗余计算。
  • 提出连续批处理与无气泡流水线,支持新请求一步加入运行批次。
  • 兼顾计算与缓存负载均衡,适合高并发图像生成服务场景。

基于扩散模型的生成式图像编辑已成为当前AI云服务中的主流应用。在生产环境中,图像编辑通常依赖掩码指定需修改的图像区域,该机制不仅提供直接控制能力,还引入了推理过程中的稀疏性。本文提出InstGenIE系统,高效服务图像编辑请求。核心洞察是:图像编辑仅修改掩码区域,而保留未掩码区域内容。基于此,InstGenIE通过重用先前推理的缓存中间激活,跳过未修改区域的冗余计算。为缓解缓存加载开销,系统采用无气泡流水线,实现计算与缓存加载重叠。此外,为降低在线服务排队延迟并提升GPU利用率,InstGenIE设计了一种新型连续批处理策略,使新请求可在一次去噪步骤内加入运行批次,无需等待整个批次完成。针对异构掩码导致的负载不均问题,系统进一步提出兼顾计算与缓存加载的负载均衡策略。综合效果上,InstGenIE相比现有最先进扩散模型服务系统,最高实现3倍吞吐提升,并将平均请求延迟降低14.7倍,同时保证图像质量。

原文摘要 · Abstract (English)

Generative image editing using diffusion models has become a prevalent application in today's AI cloud services. In production environments, image editing typically involves a mask that specifies the regions of an image template to be edited. The use of masks provides direct control over the editing process and introduces sparsity in the model inference. In this paper, we present InstGenIE, a system that efficiently serves image editing requests. The key insight behind InstGenIE is that image editing only modifies the masked regions of image templates while preserving the original content in the unmasked areas. Driven by this insight, InstGenIE judiciously skips redundant computations associated with the unmasked areas by reusing cached intermediate activations from previous inferences. To mitigate the high cache loading overhead, InstGenIE employs a bubble-free pipeline scheme that overlaps computation with cache loading. Additionally, to reduce queuing latency in online serving while improving the GPU utilization, InstGenIE proposes a novel continuous batching strategy for diffusion model serving, allowing newly arrived requests to join the running batch in just one step of denoising computation, without waiting for the entire batch to complete. As heterogeneous masks induce imbalanced loads, InstGenIE also develops a load balancing strategy that takes into account the loads of both computation and cache loading. Collectively, InstGenIE outperforms state-of-the-art diffusion serving systems for image editing, achieving up to 3x higher throughput and reducing average request latency by up to 14.7x while ensuring image quality.

图像编辑扩散模型缓存优化在线服务

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。