ParaAnya speeds up AI image creation by caching overlapping steps
ParaAnya: Accelerating Parallel Diffusion Sampling with Plug-and-Play Output Caching
Distributed, Parallel, and Cluster Computing
Summary
Diffusion models generate images step-by-step but doing this on many steps is slow because each step depends on the previous one. Some methods try to speed this up by processing several steps simultaneously in overlapping groups, but this causes the model to do the same work multiple times. The authors propose ParaAnya, which saves the results from repeated steps and reuses them instead of recalculating. This makes the image generation much faster without losing quality and can be added to existing parallel methods.
What this means in practice
- •For ai software engineers: Accelerate batch image generation pipelines by reducing redundant evaluations during parallel diffusion sampling.
- •For cloud gpu platform operators: Increase throughput of diffusion model services by lowering compute usage through output caching in parallel samplers.
Authors
Chee-En Yu, Xiao-Xi Tan, Yi-Cheng Lin, Yun-Shao Tsai, Chee-An Yu, Hung-yi Lee
Abstract
Diffusion models have achieved remarkable success in generative tasks, but their inherently sequential sampling process introduces a severe computational bottleneck. Recent Parallel-in-Time (PinT) solvers attempt to mitigate this by parallelizing generation across a sliding window of timesteps, advancing the window only when step-wise changes stabilize. However, this overlapping window mechanism forces the network to repeatedly evaluate the same timesteps. When the input variations between iterations are minimal, these redundant evaluations lead to significant computational waste. To address this inefficiency, we propose ParaAnya, an output cache mechanism agnostic to the parallel sampling algorithm that can reduce the number of function evaluations (NFE). ParaAnya caches input-output pairs of diffusion models and reuses the cached output at overlapping timesteps. By dispatching only cache-miss timesteps to GPU workers, our approach eliminates redundant computation while preserving the structure of the underlying algorithms' update rules. We integrate ParaAnya into four representative parallel sampling algorithms and evaluate its performance on Stable Diffusion v1.5. Across four parallel samplers evaluated with DDIM on eight GPUs, ParaAnya provides $1.30$--$2.43\times$ speedups over their uncached counterparts and reduces NFE by up to 70.1\%, reaching up to a $5.62\times$ speedup over single-GPU serial sampling while maintaining comparable CLIP scores.