How we used evals and inference-time compute scaling to generate beautiful QR codes that actually work
Generating aesthetic QR codes (QArt codes) with Stable Diffusion and ControlNet often produces images that don't scan, so the team built automated evals: the QReader library for scannability and a community aesthetic predictor. They validated both against roughly two thousand hand-scanned and hand-rated prompt-URL pairs. They then swept ControlNet guidance timing and strength on Modal, using a "toast plot" grid to choose a configuration with better aesthetics but a lower scan rate. To recover reliability, they moved the evals into production: they generate many candidates in parallel on GPUs and rank them by scan success and then aesthetic score. That reached a 95% scan-rate SLO with p95 latency under 20 seconds.
Related posts
- 2D Asset Generation: AI for Game Development #4
Hugging Face mediumAdeptStable Diffusion's Image2Image mode can be used as one step in a conventional 2D art workflow rather than a replacement for it: rough hand sketches are fed in, the output is painted over in an image editor, and the result is fed back in. Denoising strength sets how far the output strays from the input. A corn icon was produced in under 10 minutes by starting at 0.8 for exploration and dropping to 0.6 for refinement. A scythe icon was harder because training data skews toward weapons. That kind of bias can be countered with prompt engineering and negative prompts, or with customization techniques such as DreamBooth, textual inversion and LoRA.
- Create an infinite icon library by fine-tuning Stable Diffusion
Modal mediumAdept
Stable Diffusion v1.5 is fully fine-tuned on the ~300-icon Heroicons set to generate new icons in a similar black-and-white line style. Captions are derived from icon names like "golden-retriever" or "barack-obama". The walkthrough covers choosing between full, sequential-adapter and parallel-adapter (LoRA) fine-tuning, then preparing the data: rasterizing SVGs to PNG, adding white backgrounds, and building a metadata.csv of captions. Training uses the Diffusers train_text_to_image script on an A100 via Modal, with 4000 steps, learning rate 1e-5, batch size 1 and 128px resolution. Weights are saved to a Modal Volume and served on a cheaper A10G behind a Gradio UI, and dataset preparation proved the hardest and most important part.
- Open Preference Dataset for Text-to-Image Generation by the 🤗 Community
Hugging Face easyNoviceData is Better Together released an Apache 2.0 text-to-image preference dataset of 10K pairs, with over 30K annotations from more than 250 community members collected in under two weeks. Imgsys prompts were deduplicated, filtered for NSFW content with text and image classifiers plus manual review, and rewritten with distilabel across style categories and simple versus complex variants. Images came from FLUX.1-dev and Stable Diffusion 3.5 Large. Annotators found FLUX better for anime, manga and 3D, and SD3.5 better for cinematic and art styles. A LoRA fine-tune of FLUX-dev on the chosen samples improved its weaker art and cinematic outputs.
- Supercharge your OCR Pipelines with Open Models
Hugging Face mediumAdeptVision-language-model-based OCR has moved well beyond plain transcription. Current open-weight models such as OlmOCR-2, Chandra, dots.ocr, DeepSeek-OCR, PaddleOCR-VL, Granite-Docling and Nanonets-OCR2 handle handwriting, tables, charts, formulas and layout grounding, and output DocTags, HTML, Markdown or JSON. Choose the output format by use case: layout-preserving formats for digital reconstruction, Markdown with image captions for LLM input, and JSON for programmatic use. Since performance varies widely by domain, evaluate candidates on your own representative documents alongside OmniDocBench, OlmOCR-Bench and CC-OCR. Open models are cheap to run, around $178 per million pages for OlmOCR-2 on an H100, and serve easily with vLLM behind an OpenAI-compatible client.
- Introducing Würstchen: Fast Diffusion for Image Generation
Hugging Face mediumAdeptWürstchen is a text-to-image diffusion model whose text-conditional Prior (Stage C) runs in a latent space with 42x spatial compression, far beyond the usual 4-8x. Two decoder stages, a VQGAN (Stage A) and a Diffusion Autoencoder (Stage B), reconstruct images from that latent. The result is faster, lower-memory inference than SDXL and much cheaper training: 9,000 GPU hours for v1 and 24,602 for v2, against 150,000 for Stable Diffusion 1.4. The model is integrated into Diffusers, with example code for AutoPipeline inference, PyTorch 2 SDPA or xFormers attention, CPU offload and torch.compile, where compilation takes up to 2 minutes up front for faster runs afterwards.