Introduction
Generating high-quality images from text using diffusion models like Stable Diffusion is computationally intensive, often requiring several seconds of GPU time per request. In production environments, service providers must balance image quality with strict Service Level Objectives (SLOs) regarding latency. Existing serving systems typically employ a "cascade" approach, where a fast, lightweight model is tried first, followed by a slower, heavyweight model if the initial output is deemed insufficient by a discriminator. However, this sequential process can be inefficient, wasting resources on complex prompts that are unlikely to be satisfied by lightweight models.
The HADIS Architecture
HADIS (Hybrid Adaptive Diffusion Model Serving) addresses these inefficiencies through a novel hybrid routing architecture. Unlike standard cascades, HADIS introduces a Rule-based Router that operates before image generation.
As shown in Figure 1, the router analyzes the input prompt's characteristics—such as length and word rarity—to estimate its difficulty. If a query is identified as "obviously hard," the system bypasses the lightweight model and routes the request directly to the heavyweight model. This "bypass" mechanism saves significant GPU cycles. For queries that pass the router, a post-generation Discriminator acts as a safety net, catching "false easies" where the lightweight model failed to produce a high-quality result.
Adaptive Model Selection and Efficiency
A key design choice in HADIS is the use of a two-model cascade. Through empirical analysis, the authors found that adding a third stage introduces more management overhead than quality benefit. To optimize performance, HADIS utilizes an offline profiling phase to identify Pareto-optimal model combinations.
Figure 3 illustrates the trade-offs between latency and image quality (measured by Fréchet Inception Distance, or FID) for various models and configurations. By selecting pairs along the Pareto frontier (e.g., SDXL-Lightning paired with SD3.5-Large), HADIS ensures the best possible quality for a given latency budget. At runtime, a controller dynamically adjusts these selections and reallocates GPU resources based on real-time traffic patterns using a Mixed Integer Linear Programming (MILP) solver.
Key Results and Impact
Evaluation using ImageNet-1k captions and Microsoft Azure Functions traces demonstrates that HADIS significantly outperforms state-of-the-art baselines:
- Quality Improvement: HADIS improves response quality (FID) by 10% to 35% over baselines like Clipper and Proteus.
- Reliability: It reduces SLO violation rates by 2.7x to 45x compared to DiffServe and other state-of-the-art systems.
- Negligible Overhead: The "smart" components (router and discriminator) add only about 12ms of overhead, which is negligible compared to the seconds required for diffusion.
Conclusion
HADIS represents a significant step forward in efficient diffusion model serving. By combining predictive routing with adaptive resource management, it maintains high image quality even under fluctuating workloads. Future work may involve replacing heuristic-based routing with learned models and incorporating semantic alignment metrics into the discriminator to further refine output quality.
Summary updated