PRX Part 3 — Training a Text-to-Image Model in 24h!
A 24-hour, ~$1500 speedrun on 32 H200s combines the most effective diffusion training tricks into a single text-to-image recipe. The recipe uses x-prediction in pixel space with patch size 32 and no VAE, LPIPS and DINOv2 perceptual losses applied to pooled full images at all noise levels, TREAD token routing with dense-vs-routed self-guidance, REPA alignment to DINOv3 at block 8 on non-routed tokens only, and Muon for 2D parameters with Adam for everything else. Training ran 100k steps at 512px followed by 20k steps at 1024px on about 8.7M synthetic images. The resulting model follows prompts well, and its remaining artifacts look like undertraining rather than flaws in the recipe. Code and configs are open-sourced in the PRX repository.
Related posts
- Training Design for Text-to-Image Models: Lessons from Ablations
Hugging Face hardMasterPhotoroom's ablations on its PRX-1.2B text-to-image model compare recent training-efficiency techniques against a plain Flow Matching baseline: 100k steps at 256×256 on 1M MidJourney images, scored with FID, CMMD, DINO-MMD and throughput. REPA with a frozen DINOv3 teacher cut FID from 18.2 to 14.64 at the cost of throughput (3.95 to 3.46 batches/s), and DINOv2 offered a cheaper middle ground. iREPA's spatial tweaks helped with DINOv2 but hurt with DINOv3, and alignment works best as a temporary scaffold: dropping REPA after about 200K steps sharpened fine detail. The post also covers latent-space alignment (REPA-E, the FLUX.2 AE), training objectives, token routing and sparsification, and data choices.
- Welcome FLUX.3 Image Klein in Diffusers
Hugging Face mediumAdeptFLUX.3 Image Klein from Black Forest Labs is supported in Diffusers from launch. It is a single model for text-to-image, multi-reference image-to-image, and bounding-box layout control, where regions are written as JSON with normalized 0–1000 boxes to place new content or move content from a reference image. The distilled checkpoint renders 1024×1024 in about 1.9 s on an H100 in 16 steps without CFG. Reference images roughly double the time because each adds 4,096 tokens to the transformer sequence. The post also covers FP8 and NVFP4 single-file variants that cut peak memory to about 15–16 GiB, DreamBooth LoRA training scripts, the VAE tokenization (one token per 16×16 patch), and Modular Diffusers pipeline usage.
- The Annotated Diffusion Model
Hugging Face hardMasterDenoising Diffusion Probabilistic Models (Ho et al., 2020) work by pairing a fixed forward process that gradually adds Gaussian noise to an image under a variance schedule with a learned reverse process that denoises step by step from pure noise. A closed-form property lets x_t be sampled directly from x_0, and a reparametrization of the mean turns training into a simple MSE loss on predicting the added noise at a randomly sampled timestep. The walkthrough derives this objective and then implements the model step by step in PyTorch: a U-Net with residual connections, sinusoidal timestep embeddings and weight-standardized ResNet blocks with group normalization, following Phil Wang's implementation.
- LoRA training scripts of the world, unite!
Hugging Face hardMasterCombining Pivotal Tuning (textual inversion of newly inserted tokens, then LoRA fine-tuning) with the adaptive Prodigy optimizer produces strong SDXL Dreambooth LoRA results, and both are now available in a diffusers training script. The guide covers the relevant flags and recommended values: stopping textual inversion halfway through training, Prodigy with learning_rate=1.0 and bias correction, and separate text encoder and UNet learning rates. It also covers custom BLIP captions, Min-SNR gamma of 5.0, image repeats, prior preservation loss and dataset curation tips for faces and objects. Experiments on a 31-image Huggy mascot dataset compare batch sizes, optimizers and text encoder training modes.
- 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.