NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adaptive Routing of Text-to-Image Generation Requests Between Large Cloud Model and Light-Weight Edge Model

Zewei Xin, Qinya Li, Chaoyue Niu, Fan Wu, Chen, Guihai · DOI

Abstract

Large text-to-image models demonstrate impressive generation capabilities; however, their substantial size necessitates expensive cloud servers for deployment. Conversely, light-weight models can be deployed on edge devices at lower cost but often with inferior generation quality for complex user prompts. To strike a balance between performance and cost, we propose a routing framework, called RouteT2I, which dynamically selects either the large cloud model or the light-weight edge model for each user prompt. Since generated image quality is challenging to measure and compare directly, RouteT2I establishes multi-dimensional quality metrics, particularly, by evaluating the similarity between the generated images and both positive and negative texts that describe each specific quality metric. RouteT2I then predicts the expected quality of the generated images by identifying key tokens in the prompt and comparing their impact on the quality. RouteT2I further introduces the Pareto relative superiority to compare the multi-metric quality of the generated images. Based on this comparison and predefined cost constraints, RouteT2I allocates prompts to either the edge or the cloud. Evaluation reveals that RouteT2I significantly reduces the number of requesting large cloud model while maintaining high-quality image generation.

Introduction

The state-of-the-art in text-to-image (T2I) generation is moving toward massive models with billions of parameters. While these models produce stunning results, they are expensive to run, often requiring high-end cloud GPUs that can cost upwards of $65 per million requests. Conversely, "edge" models are small enough to run on local devices like smartphones for free, but they often struggle with complex prompts, producing artifacts or blurry textures. The challenge is predictive routing: determining before generation if a cheap edge model will suffice. Unlike text generation, image quality is subjective and multi-faceted, making it difficult to predict performance gaps from the input prompt alone.

The RouteT2I Framework

RouteT2I intelligently decides whether to send a prompt to a high-end cloud model or a lightweight edge model by predicting the "quality gap" between them.

Overview of the RouteT2I routing framework between cloud and edge models.

The framework consists of three core innovations:

  1. Multi-Metric Quality Evaluation: The system evaluates images across 10 dimensions (e.g., Clarity, Realism, Object Integrity). It uses a contrastive CLIP-based approach, comparing images against positive and negative text descriptors to measure specific attributes.
  2. Pareto Relative Superiority (PRS): To compare models across multiple metrics, PRS quantifies the cloud model's quality advantage for a specific prompt, even when models excel in different areas.
  3. Dual-Gate Token Selection MoE: The routing model is a Transformer-based Mixture-of-Experts (MoE) that uses two gates to identify specific tokens in a prompt likely to impact image quality. It learns which keywords are "hard" concepts (e.g., "transparent") requiring cloud-level modeling.

Experimental Results

The researchers evaluated RouteT2I using COCO 2014 and LAION2B-en-aesthetic datasets across 18 model pairs, including Stable Diffusion 3 (SD3) as the cloud model and SD2.1 or SD1.5 as edge models.

The "Easy Prompt" Dividend

A key finding is that for simple prompts (e.g., "a dog lying on the ground"), edge models often perform comparably to cloud models. Routing these to the edge provides significant cost savings without quality loss.

Visual comparison of SD2.1 (edge) and SD3 (cloud) performance across various prompt complexities.

Performance and Efficiency

  • Efficiency: By routing only 50% of requests to the cloud, RouteT2I achieves 83.97% of the quality improvement of a 100% cloud setup.
  • Cost Savings: RouteT2I reduces cloud requests by 70.24% compared to random routing while hitting the same quality targets.
  • Low Latency: The router adds only ~64ms of overhead on an edge device (NVIDIA Jetson TX2), which is negligible compared to image generation time.

Conclusion

RouteT2I demonstrates that intelligent, multi-dimensional routing can drastically reduce the operational costs of high-quality T2I generation. By identifying "key tokens" and leveraging the "easy prompt dividend," the framework maintains high performance while offloading a majority of tasks to local edge devices. Future work will explore dynamic thresholds and deeper alignment with human preferences.

Summary updated

BibTeX
@misc{xin2024adaptive,
  author = {Zewei Xin and Qinya Li and Chaoyue Niu and Fan Wu and Chen, Guihai},
  title = {{Adaptive Routing of Text-to-Image Generation Requests Between Large Cloud Model and Light-Weight Edge Model}},
  year = {2024},
  eprint = {2411.13787},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.13787},
}
Figure