source: hugging face blog: prx part 4: our data strategy

level: technical

photoroom assembled pre-training data from a mix of public and internal datasets, prioritizing diversity and coverage over per-image perfection. they relied on existing curation where possible, using sources that were already quality-filtered, deduplicated, and cleaned of nsfw content and personal information. the goal was to teach the model visual concepts, composition, and the range of real-world imagery, leaving aesthetic refinement to later fine-tuning stages.

all images were re-captioned using a vision-language model to ensure long, accurate descriptions. experiments showed that longer captions from qwen2.5-vl-7b significantly improved sample quality over shorter ones, lowering fid, cmmd, and dino-mmd scores. the captioning pipeline ran on ray data, reading from lance tables and writing captions back as a new column. accurate captions turned potential noise like screenshots or logos into controllable attributes, reducing the need for heavy filtering.

the team used lance for dataset building and exploration, benefiting from its columnar format, indexing, and full-text and vector search. they stored final training data in mosaic data shards for efficient streaming during distributed training. images were encoded as jpeg at quality 92 after tests showed negligible perceptual loss compared to png, with no measurable impact on model output quality. text latents were computed on the fly to keep shards small and allow easy encoder changes.

why it matters: shows practical trade-offs in building large-scale image datasets, including captioning strategies and storage formats that affect training efficiency and model quality.


source: hugging face blog: prx part 4: our data strategy