Abstract
Serving high-quality text-to-image (T2I) diffusion models at scale is notoriously slow and expensive. This paper introduces a prompt-aware scheduling system that utilizes "approximate caching" to dynamically adjust the number of denoising steps for each request. By optimizing resource allocation through a macro-level Resource Controller and a micro-level Query Dispatcher, the proposed system achieves up to 40% higher throughput and 10x fewer service-level objective (SLO) violations compared to state-of-the-art baselines while maintaining high image quality.
Introduction
Generating images from text using Diffusion Models, such as Stable Diffusion XL (SD-XL), is computationally heavy, often requiring 50 to 100 denoising steps. On high-end hardware like NVIDIA A100 GPUs, this process can still take several seconds per image. Traditional machine learning serving systems often employ "accuracy scaling"—switching to smaller, faster models during peak traffic. However, this approach is ill-suited for T2I tasks due to the significant overhead of loading massive models into GPU memory and the high sensitivity of image quality to specific input prompts.
To address these challenges, the authors propose a system that maintains a single model across a fixed cluster but varies the "approximation level" for each request. This is achieved through Approximate Caching (ApproxC), which allows the system to skip a specific number of initial denoising iterations ($K$) based on prompt similarity to cached results.
System Architecture and Methods
The system architecture is divided into two primary tiers to handle both long-term resource optimization and real-time request routing.
Resource Controller (Macro-level)
The Resource Controller periodically analyzes system load, query logs, and profiled information. It solves a global optimization problem to determine the optimal distribution of GPU instances running at various $K$ values. For instance, it might designate some GPUs to skip 5 steps for complex prompts while others skip 25 steps for simpler ones, maximizing throughput within a predefined quality budget.
Query Dispatcher (Micro-level)
When a prompt query arrives, the Dispatcher predicts its "Optimal-K" (the maximum number of steps that can be skipped without perceptible quality loss). It then employs a route-and-batch technique. If a GPU with the exact Optimal-K is unavailable, the dispatcher uses redirection logic to send the prompt to the next best available instance, balancing quality and latency. During high traffic, the system switches from uniform routing to a "greedy routing" strategy (prioritizing workers with longer queues) to maximize batch efficiency.
Experimental Evaluation
The system was evaluated on a cluster of 8 NVIDIA A100 GPUs using the SD-XL model. The researchers utilized the DiffusionDB dataset for real-world user prompts and a Twitter trace workload to simulate realistic, fluctuating traffic patterns over time.
Key Results
The proposed system was compared against several state-of-the-art baselines, including Clipper, Nirvana, and Proteus.
- Throughput: The system achieved up to 40% higher throughput than existing baselines by eliminating model-switching overhead and optimizing denoising steps.
- Quality: It maintained a consistent relative quality of over 90%, outperforming the best baseline by roughly 10% under heavy load.
- Reliability: SLO violations were reduced by 10x, remaining below 5% even during significant traffic spikes, whereas baselines saw violations soar.
Conclusion and Future Work
By treating the number of denoising steps as a tunable "knob" rather than switching between discrete models, this prompt-aware scheduling system offers a highly efficient path for scaling T2I services. Future work will explore dynamic horizontal scaling of the GPU cluster and extending the architecture to other generative modalities, such as video and audio. Additionally, the authors plan to investigate performance in heterogeneous hardware environments containing mixed GPU types.
Summary updated