Services that turn text prompts into images keep costs down by sending some requests to cheap, fast image generators and saving the expensive ones for requests that need them. The software that makes this choice is usually an optimizer, specifically an integer linear program: a solver that picks yes/no assignments to maximize a score subject to hard limits. Here the score is predicted image quality and the limits are GPU capacity and latency deadlines. The predicted quality comes from automatic metrics, and those metrics are known to disagree with people. They miss extra fingers, fused limbs and garbled text as long as local textures look realistic. This note argues that the disagreement does more harm inside an optimizer than inside a leaderboard. A solver that maximizes a flawed score will, by construction, send cheap models to exactly the requests where the score most overrates them. Errors that look random on average become systematic in the requests the solver actually selects.
We propose to change what the scheduler is asked to guarantee. It still maximizes predicted quality under compute and latency limits, but it must also keep the expected fraction of served images with severe structural defects below a budget. Each defect probability, for a given prompt and model, is estimated before generation and then made conservative using a small set of human-labeled images. Two claims make this worth testing. First, the "optimizer's curse" (selecting on noisy estimates inflates their apparent value) is measurable and large for current quality proxies in serving. Second, a calibrated defect constraint removes most of that damage at a small compute cost, while a better point metric alone does not.
Core Claim
Three systems already couple optimization with image quality. Argus uses a prompt classifier to predict how much approximation each prompt tolerates, then solves an integer program over approximation levels under latency targets. DiffServe runs a light model first, checks the image with a learned real-versus-fake discriminator, escalates rejects to a heavy model, and periodically solves a mixed-integer program over thresholds, batch sizes and GPU placement. CATImage routes each prompt before generation with a per-query rule, predicted quality minus λ times cost, with no shared capacity constraint. All three treat the quality estimate as if it were the truth, and all three optimize an average. None asks how often the served images contain the localized defects that, according to AGIDefect-4K, make up most generation failures (over 85% cover less than 5% of the image) and drive human ratings down.
DiffServe supplies the key evidence for our framing. When it tried PickScore and CLIPScore as escalation discriminators, both did worse than a random classifier. A proxy that is anti-correlated with the decision is the extreme case of what we hypothesize happens more mildly with any proxy. The optimizer amplifies the proxy's errors on the subset it selects. Our contribution is a scheduler that budgets risk on a human-grounded quantity instead of trusting a point estimate, and an empirical test of whether that matters.
Research Program
The decision variable $x_{ij} \in \{0,1\}$ assigns request $i$ in a scheduling window to generator $j$, for example SDXL-Turbo, SDXL-Lightning, or SDXL at 20 or 100 steps, which is CATImage's pool. Let $\hat q_{ij}$ be the predicted quality, $c_j$ the GPU-seconds generator $j$ costs, $C$ the window's capacity, and $\bar d_{ij}$ a calibrated upper bound on the probability that generator $j$ produces a severely defective image for prompt $i$, taken over random seeds. The scheduler solves
$$\max_x \sum_{i,j} x_{ij}\,\hat q_{ij} \quad \text{s.t.} \quad \sum_{i,j} x_{ij} c_j \le C,\;\; \sum_j x_{ij}=1,\;\; \frac{1}{N}\sum_{i,j} x_{ij}\,\bar d_{ij} \le \varepsilon,$$
where $N$ is the number of requests in the window and $\varepsilon$ is the operator's defect budget. The latency and batching constraints are inherited unchanged from DiffServe's controller, so the comparison isolates the defect term. This is still a multiple-choice knapsack with one extra linear row, the same structure OCCAM solves with negligible overhead for classifier portfolios. We expect solve times to stay near DiffServe's reported ~10 ms. Measuring them is part of the work.
The defect estimator is the substantive part. We train a prompt-and-model-conditioned predictor of defect probability on frozen text embeddings, in the style of CATImage's quality regressors. Its targets come from generating several seeds per prompt and model on DiffusionDB prompts (DiffusionDB) and labeling severe defects with the AGIDefect-4K taxonomy. Labels come from a defect detector trained on AGIDefect-4K, plus a human-labeled calibration subset. The detector is weak: AGIDA reaches only 0.65 detection AUC. For that reason we do not use it as a hard gate, as a cascade would. Instead we fit the predictor's probabilities on the human subset and convert them to upper bounds $\bar d_{ij}$, calibrating separately within prompt groups such as people and hands, rendered text, multi-object scenes and landscapes.
Group-wise calibration is what the constraint needs. Marginal coverage across all prompts would be broken by the solver's selection. Calibration within groups the solver cannot "see inside" bounds the selected batch's defect rate, provided the groups are fine enough. The research question here is how fine the groups must be before the guarantee holds empirically. We answer it with a held-out human audit of the images the scheduler actually serves.
Baselines
The naive reference serves every request with the heavy model when capacity allows and otherwise falls back first-come-first-served to the fastest model. It shows what quality and defect rate cost-blind serving delivers.
The strongest existing method is DiffServe's query-aware mixed-integer controller with its EfficientNet real-versus-fake discriminator. It is the only published system that co-optimizes thresholds, batch sizes and GPU placement under bursty load. It reports 19–70% lower SLO-violation rates and up to 24% better FID than static and query-agnostic baselines on the Azure Functions trace (DiffServe). Argus is the strongest pre-generation competitor, reporting 10x fewer SLO violations and 10% higher average quality (Argus). CATImage's greedy rule is the unconstrained routing reference; it matches SDXL-100 sharpness at 0.13% of its compute on COCO (CATImage).
All of them run on the same generator pool, cluster size, traces and prompt stream. They also get the same tuning budget: equal grid search over thresholds, λ, or ε on a shared validation window. No reported result was found on Lacuna for any of these systems' human-audited defect rate of served images, so that number must be measured here.
Two ablations isolate the key ingredient. The first, "better metric only," replaces DiffServe's quality term with HPS or AGIDA quality scores but adds no defect constraint. The second, "uncalibrated constraint," uses the raw predicted defect probabilities in the constraint instead of the calibrated upper bounds. Beating the baselines means the following. At matched GPU-seconds and SLO-violation rate within one percentage point of DiffServe, the served severe-defect rate stays below ε on the human audit, while every baseline exceeds it. In addition, the human pairwise preference win rate against all-heavy serving is no worse than DiffServe's.
Why not just…?
Why not just plug a better perceptual metric into DiffServe's or Argus's optimizer? This is the real threat. If a metric like HPS (43.5% human-choice accuracy, against 33.1% for plain CLIP) or AGIDA (0.800 SRCC on AGIDefect-4K) were accurate enough, the solver's selection bias would be small and our constraint would add little. HPS's accuracy is still far from perfect, and AGIDefect-4K reports that defects are small and easy to miss, so we expect residual errors that the solver concentrates. The "better metric only" ablation settles this directly. If its audited defect rate on selected requests matches ours, the idea reduces to metric replacement and we would report that.
Why not just add a fixed safety margin, penalizing cheap models on risky-looking prompts? A hand-set penalty is the over-provisioning heuristic that cloud workload optimization showed wastes capacity. It also gives no statement about the defect rate actually delivered. We include a tuned per-group penalty as an additional baseline. Our method must reach the same audited defect rate with fewer GPU-seconds, or a lower defect rate at equal cost.
Why not just generate cheaply, run a defect detector, and regenerate failures? This is DiffServe's cascade with a better checker. It wastes the first generation on every reject, and the best available detector reaches only 0.65 AUC. Zero-shot multimodal judges score 0.29–0.38 on AGIDefect-4K, so hard gating either misses defects or rejects many good images. We run this cascade, with the AGIDA detector at tuned thresholds, under the same traces and report its compute-versus-defect curve beside ours. A hybrid that adds post-hoc checks to our constraint is a natural follow-up if the cascade wins on a subset of prompt groups.
Proposed Experiments
The first and decisive check measures the optimizer's curse directly. For each scheduler, we compare the gap between proxy-predicted and human-judged quality on the requests the solver routed to cheap models with the same gap on a random subset of equal size. A significantly larger gap on the selected set confirms the premise. A negligible gap means the defect constraint is unnecessary, and the project pivots to metric evaluation.
The second experiment replays the Azure Functions trace, as DiffServe does, and the Twitter trace, as Argus does, on DiffusionDB and MS-COCO prompts. It sweeps ε and capacity and traces Pareto curves of GPU-seconds against audited defect rate against human preference win rate. It also reports SLO violations and solver latency.
The third experiment stresses calibration under shift. We calibrate on DiffusionDB prompts and serve COCO prompts, and vice versa. We check whether the delivered defect rate stays under ε and how much finer prompt grouping restores it. This directly tests the out-of-distribution weakness the research file flags for OCCAM-style estimators.
The fourth experiment checks semantic fidelity, using CLIP-based prompt alignment alongside human prompt-adherence judgments. It tests whether the defect budget pushes the solver toward models that look clean but follow prompts less well, the "alignment tax" HPS warns about.
References
- Argus: Quality-Aware High-Throughput Text-to-Image Inference Serving System
- DiffServe: Efficiently Serving Text-to-Image Diffusion Models with Query-Aware Model Scaling
- Cost-Aware Routing for Efficient Text-To-Image Generation
- AGIDefect-4K: A Richly Annotated Dataset for AI-Generated Image Defect Detection, Localization and Explanation
- OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification Inference
- DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative Models
- Human Preference Score: Better Aligning Text-to-image Models with Human Preference
- A Minimum-Cost Flow Model for Workload Optimization on Cloud Infrastructure