PRX Part 4: Our Data Strategy
PRX's pre-training corpus for a 7B text-to-image model is assembled from public and internal datasets, re-captioned with a VLM into long dense paragraphs, curated in Lance and streamed to training as Mosaic Data Shards. The pipeline favors breadth over aesthetic filtering and relies on faithful captions to turn imperfections like text or logos into promptable attributes. Measured decisions include storing images as JPEG quality 92, since PNG-vs-JPEG training runs were indistinguishable, and computing Qwen3-VL text latents on the fly for only a ~3–4% throughput cost. Over-fragmented Lance tables made queries slow until compaction to ~1M rows per fragment, and long Qwen2.5-VL captions clearly beat short LLaVA captions on FID, CMMD and DINO-MMD.
Related posts
- Build awesome datasets for video generation
Hugging Face mediumAdeptA three-stage pipeline for building small video-generation fine-tuning datasets: acquisition with yt-dlp and scene splitting, per-frame filtering for watermarks, aesthetics and NSFW content plus an OpenCV motion score, and captioning with Florence-2 or a video captioner like Qwen2VL. Filtering the crush-smol dataset on pwatermark < 0.1 and aesthetic > 5.5 kept only 47 of 1493 clips. The authors conclude that averaging watermark scores across frames with a 0.2–0.3 threshold works better, and that aesthetic scores are biased toward colorful, regular shapes and suit a minimum cutoff of about 4.25–4.5. The resulting datasets were used to fine-tune CogVideoX-5B with finetrainers for effects like Crush and Cakeify.
- 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.
- PRX Part 3 — Training a Text-to-Image Model in 24h!
Hugging Face hardMasterA 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.
- Introducing TextImage Augmentation for Document Images
Hugging Face mediumAdeptAlbumentations adds a TextImage transform that augments document images and their text annotations together, so vision-language models fine-tuned on small document datasets see text-preserving variations. It picks random text lines (fraction_range), applies word-level edits (random swap, deletion, or stopword insertion), blacks out and inpaints the original line, and re-renders the new text sized from the bounding box (font_size_fraction_range). The transform composes with other Albumentations transforms such as PlanckianJitter and Affine, returns the altered text and bounding boxes via overlay_data for training labels, and can render arbitrary text onto templates to generate synthetic data. Synonym replacement was dropped because of its time overhead.
- Docmatix - a huge dataset for Document Visual Question Answering
Hugging Face mediumAdeptDocmatix is a Document Visual Question Answering dataset with 2.4 million images and 9.5 million Q/A pairs drawn from 1.3 million PDFs, roughly 240x larger than earlier DocVQA datasets. Q/A pairs were generated with Phi-3-small from PDFA OCR transcriptions. About 15% of generations were discarded as hallucinations using regex code detection and an "unanswerable" keyword filter, and prompts were tuned toward about four diverse, human-like pairs per page. Fine-tuning the 0.7B Florence-2 on a small slice of Docmatix and then DocVQA raised ANLS from 60.1 to 71.4. That is within about 5% of the 8B Idefics2.