Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 31 min read Research hardMaster

Training Design for Text-to-Image Models: Lessons from Ablations

Photoroom'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.

Assumes: diffusion and flow matching modelstransformer architecturesVAE latent spacesimage generation metrics like FID

Related posts

  • PRX Part 3 — Training a Text-to-Image Model in 24h!

    Hugging Face hardMaster

    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.

  • Open Preference Dataset for Text-to-Image Generation by the 🤗 Community

    Hugging Face easyNovice

    Data 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.

  • Run FLUX.1-dev three times faster

    Modal mediumAdept

    FLUX.1-dev image generation on Modal drops from ~6.75s to under three seconds per 1024x1024 image. About 1.5x comes from standard optimizations: torch.compile with max-autotune, fused QKV projections and channels-last memory layout. Another 2x comes from First Block Caching (via ParaAttention, based on TEACache), which skips denoising steps whose early-block residual change falls below a threshold. A threshold of 0.12 gave a good quality/speed tradeoff. The tens of minutes of compile time added to cold starts were cut roughly 30x by persisting Inductor, Triton and CUDA caches on a volume and using Modal memory snapshots.

  • Welcome FLUX.3 Image Klein in Diffusers

    Hugging Face mediumAdept

    FLUX.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.

  • Direct Preference Optimization Beyond Chatbots

    Hugging Face hardMaster

    Adding a DPO stage after supervised fine-tuning reduced text degeneration (repetition loops) in every one of five vision-language model families tested on Brazilian Portuguese structured OCR. The average reduction was 59.4% and the best was 87.6%, with Nanonets-OCR2-3B falling from 1.61% to 0.20%. The key design choice was to keep the SFT model's own degenerate outputs as the rejected examples in preference pairs, rather than filtering them out. An LLM judge scored multiple candidate responses per document across 23,726 documents to pick chosen and rejected outputs. The authors argue that token-level SFT loss cannot penalize completion-level failures like loops, while DPO can, and they outline when the approach should transfer to other structured generation tasks: the failure mode must be a distinct, recognizable class of output.

The quest for software engineering knowledge.

Look:
Layout: