Marketing ops · Production

Modal uses evals and inference-time compute scaling to build QArt codes with a ninety-five percent scan rate

The problem

QArt codes — QR codes embedded in AI-generated images — reliably failed to scan in real-world use despite impressive demos, making it impossible to consistently produce codes that were both beautiful and scannable.

First attempt

An initial version of the system produced scannable codes only when using simple texture or style prompts, failing with complex scene descriptions, and falling far short of the original viral demo's promise.

Workflow diagram · grounded in source
1
User request initiates batch
trigger
“By creating eight generations per request”
2
Diffusion model generates images
ai_action
“ControlNets based on brightness patterns or edges, like the one demonstrated above, could be used to produce images with the brightness and darkness patterns of a QR code”
3
Scan and aesthetic evaluation
validation
“We found the QReader library for QR code scanning, which uses a YOLO model to detect QR codes and then applies a number of transformations, like blurring and thresholding, before attempting to interpret the image as a code. We also found…”
4
Rank and select top four
routing
“Our frontend then ranks the QR codes — first by whether they scan, then by their aesthetic score — and selects the top four for display.”
Reported outcome

By developing automated evals and applying inference-time compute scaling with eight parallel generations per request, the team achieved a ninety-five percent scan rate SLO while improving aesthetic quality and returning codes to users in under 20s, p95.

Reported metrics
QR code scan rate SLOninety-five percent
End-to-end latency p95under 20s, p95
Reported stack
Stable DiffusionControlNetQReaderYOLOWeights & Biases' WeaveModal
Source
https://modal.com/blog/qart-codes-evals
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

By developing automated evals and applying inference-time compute scaling with eight parallel generations per request, the team achieved a ninety-five percent scan rate SLO while improving aesthetic quality and return…

What tools did this team use?

Stable Diffusion, ControlNet, QReader, YOLO, Weights & Biases' Weave, Modal.

What results were reported?

QR code scan rate SLO: ninety-five percent; End-to-end latency p95: under 20s, p95 (source-reported, not independently verified).

What failed first in this deployment?

An initial version of the system produced scannable codes only when using simple texture or style prompts, failing with complex scene descriptions, and falling far short of the original viral demo's promise.

How is this marketing ops AI workflow structured?

User request initiates batch → Diffusion model generates images → Scan and aesthetic evaluation → Rank and select top four.