SDE & MLE Prep

Text-to-Image Generation Service

Goal: generate high-quality images from text prompts at scale, safely, with a few seconds of latency.

prompt -> safety filter (blocked concepts) -> text encoder (CLIP/T5) -> latent diffusion model (DiT / U-Net)
       -> 20-50 denoising steps with classifier-free guidance -> VAE decoder -> (super-resolution)
       -> output safety classifier (NSFW, likeness) -> watermark -> image
  • Model: latent diffusion — train a VAE to compress images, then a diffusion transformer to denoise latents conditioned on text via cross-attention; trained on large filtered, recaptioned image–text data (better captions → better prompt following).
  • Serving cost: each image = dozens of network evaluations → step-reduction (DPM-Solver, distillation, consistency models), batching, fp16/fp8, smaller resolution + super-resolution, caching prompt embeddings; GPU autoscaling with queues and per-user quotas.
  • Controls: guidance scale, seed, negative prompts, image-to-image, inpainting, ControlNet-style conditioning (pose, edges).
  • Safety: prompt classifiers, output classifiers, block real-person likeness/IP misuse, invisible watermarking (C2PA provenance metadata).
  • Evaluation: FID / CLIP score offline, human preference win rates (side by side), prompt-adherence benchmarks; online: regeneration rate, downloads.