DiffServe: Efficiently Serving Text-to-Image Diffusion Models with Query-Aware Model Scaling
Sohaib Ahmad, Qizheng Yang, Haoliang Wang, Ramesh K. Sitaraman, Hui Guan
TL;DR
DiffServe tackles the challenge of efficiently serving text-to-image diffusion models under fluctuating query demand by introducing query-aware model scaling through light–heavy diffusion cascades and a learned discriminator to route prompts by complexity. A MILP-based resource allocator optimizes the distribution of hardware, batch sizes, and the cascade’s confidence threshold, guided by latency and throughput constraints that account for queuing delays via Little's law. The discriminator, built on EfficientNet and trained with real images, enables accurate quality assessment to minimize unnecessary deferrals to heavier models, while the MILP balances quality and throughput. Across synthetic and real traces, DiffServe reports up to 24% improvements in image quality and up to 70% reductions in SLO violations relative to baselines, demonstrating scalable, production-ready diffusion model serving.
Abstract
Text-to-image generation using diffusion models has gained increasing popularity due to their ability to produce high-quality, realistic images based on text prompts. However, efficiently serving these models is challenging due to their computation-intensive nature and the variation in query demands. In this paper, we aim to address both problems simultaneously through query-aware model scaling. The core idea is to construct model cascades so that easy queries can be processed by more lightweight diffusion models without compromising image generation quality. Based on this concept, we develop an end-to-end text-to-image diffusion model serving system, DiffServe, which automatically constructs model cascades from available diffusion model variants and allocates resources dynamically in response to demand fluctuations. Our empirical evaluations demonstrate that DiffServe achieves up to 24% improvement in response quality while maintaining 19-70% lower latency violation rates compared to state-of-the-art model serving systems.
