Skip to content

MegaStyle: Constructing Diverse and Scalable Style Dataset via Consistent Text-to-Image Style Mapping

MegaStyle builds a 1.4M-image style-transfer dataset by exploiting Qwen-Image’s consistent text-to-image style mapping: VLM-captioned content (400K) and style (170K) prompts from real image pools are combined as content×style products and rendered by Qwen-Image, producing pairs that share a single style across diverse content. Trained on this dataset, a SigLIP-based style encoder (MegaStyle-Encoder) under a new style-supervised contrastive objective and a FLUX-based transfer model (MegaStyle-FLUX) substantially outperform prior style baselines on retrieval and human-preference metrics. The paper is a clean case study in using a SOTA T2I generator as a synthetic-data source for a downstream specialized task whose real-world paired data is essentially unobtainable.

  • Qwen-Image’s text-to-image style mapping is consistent enough that two images generated from the same style prompt but different content prompts share a perceptual style; this is the foundational empirical observation that justifies prompt-product synthesis as a substitute for paired-image curation [§3.1, Fig. 2(c), Fig. 4].
  • The curated prompt gallery contains 170K style prompts and 400K content prompts after Nemo-Curator exact/fuzzy/semantic dedup followed by four-level hierarchical k-means rebalancing (50K → 10K → 5K → 1K clusters over mpnet embeddings), yielding 8,355 distinct overall artistic style descriptors and 68B possible content×style combinations [§3.1, Fig. 5].
  • MegaStyle-1.4M offers more overall artistic styles (8,355) and finer styles (170K) than prior style datasets — WikiArt (27 overall styles, 80K images), JourneyDB (300K fine-grained, 4.4M images, no intra-style consistency), Style30K (1K fine, 30K images), IMAGStyle (15K fine, 210K) and OmniStyle-150K (1K fine, 150K) — while preserving intra-style consistency [Tab. 1].
  • Style-supervised contrastive learning (SSCL) with a SigLIP image encoder plus a SigLIP image–text contrastive regularizer, trained at batch size 8,192 on MegaStyle-1.4M, produces MegaStyle-Encoder; on the StyleRetrieval benchmark it reaches mAP@1 = 88.46 / Recall@10 = 97.66 (SoViT) vs SigLIP at 10.43 / 36.32, and ViT-L variant beats CSD 87.26 vs 45.60 mAP@1 [§3.2, Tab. 2].
  • MegaStyle-Encoder retains its lead on out-of-distribution benchmarks not generated by Qwen-Image: StyleBench (real artworks, 40 styles) — mAP@1 85.0 vs CSD 70.0; FLUX-Retrieval (76,800 FLUX-generated images, 2,400 styles) — 22.70 vs 14.16; OmniStyle-150K — 78.89 vs 60.86 [Tab. 5].
  • MegaStyle-FLUX (FLUX with shifted RoPE on concatenated reference-style visual tokens, trained on style pairs from MegaStyle-1.4M) achieves the highest text-alignment (23.20 CLIP-text), second-best automatic style score (76.16), and highest human-preference scores (Human Style 31.37, Human Text 28.72) vs StyleCrafter/DEADiff/Attn-Distill/InstantStyle/CSGO/StyleAligned/StyleShot [Tab. 3].
  • Controlled head-to-head training MegaStyle-FLUX on MegaStyle-1.4M vs JourneyDB vs OmniStyle-150K shows style score 76.16 vs 34.56 vs 51.49 and text score 23.20 vs 21.12 vs 23.02, isolating the dataset (not the architecture) as the load-bearing component [§5.3, Tab. 4].

The pipeline has three stages. (1) Image-pool collection: ~2M style images (WikiArt + filtered public corpora) and ~2M non-style content images. (2) Prompt curation and balance: Qwen3-VL captions every image with style-only or content-only instructions, then Nemo-Curator dedups (exact + fuzzy + semantic) and DINOv3-style hierarchical k-means rebalances over mpnet text embeddings, yielding 170K style + 400K content prompts. (3) Style image generation: pair each style prompt with sampled content prompts and render with Qwen-Image, producing the 1.4M MegaStyle-1.4M dataset where any two images sharing a style prompt are training-grade positive pairs.

On top of the dataset two models are trained. MegaStyle-Encoder fine-tunes SigLIP with style-supervised contrastive learning: positives are images sharing a style prompt (i.e. the 170K fine-grained style classes act as supervision labels), with an auxiliary SigLIP image–text contrastive term as regularizer; only the image tower updates, batch size 8,192. MegaStyle-FLUX is paired-supervision FLUX: two same-style images from MegaStyle-1.4M serve as (reference, target); the reference is VAE-encoded and patchified, concatenated with noisy target tokens and target’s content caption as text prompt; an additional shifted RoPE is applied to reference-style tokens to prevent positional collision and content leakage. Only the MM-DiT updates; VAE and text encoder remain frozen.

  • Style retrieval on StyleRetrieval (in-distribution): MegaStyle-Encoder mAP@1 88.46 / Recall@10 97.66 (SoViT) and 87.26 / 97.61 (ViT-L) vs CSD 45.60 / 79.18 and SigLIP 10.43 / 36.32 [Tab. 2].
  • Style retrieval on three OOD benchmarks: StyleBench (real artworks) 85.0 mAP@1 (vs CSD 70.0); FLUX-Retrieval 22.70 (vs CSD 14.16); OmniStyle-150K 78.89 (vs CSD 60.86) [Tab. 5].
  • Style transfer head-to-head (StyleBench, vs seven baselines): MegaStyle-FLUX gets best Text (23.20) and best Human Style (31.37) and Human Text (28.72); automatic Style (76.16) is second to Attn-Distill (85.59), which the authors attribute to Attn-Distill copying the reference image (Human Text only 6.31) [Tab. 3, Fig. 9].
  • Dataset ablation (same MegaStyle-FLUX architecture, vary training dataset): style score 76.16 (MegaStyle-1.4M) vs 51.49 (OmniStyle-150K) vs 34.56 (JourneyDB); text scores 23.20 vs 23.02 vs 21.12 [Tab. 4].
  • Fair-baseline check: re-training StyleShot (the only baseline with available training code) on MegaStyle-1.4M is included in the discussion to disentangle dataset vs architecture (full numbers in §5.3).

MegaStyle is a sharper version of the bet Synthetic Training Data already tracks: when a SOTA generator (Qwen-Image) has a property the target task needs (consistent style-from-text mapping) and the corresponding real-data pairs are essentially unobtainable (matching styles across changing content), the generator becomes the dataset. The pipeline collapses to caption→dedup→combine→render, with a four-level hierarchical-k-means balance step as the only non-trivial control. This contrasts with the verification-gated synthesizers on Synthetic Training Data (Video-Thinker’s hindsight curation, Action100M’s Self-Refine, Close the Loop: Synthesizing Infinite Tool-Use Data via Multi-Agent Role-Playing‘s multi-agent loop) — MegaStyle has no per-sample verification gate; instead it trusts Qwen-Image’s per-prompt style-mapping consistency as an implicit gate, then dedups and balances at the prompt level rather than the output level. The OOD numbers on real-artwork StyleBench (mAP@1 85.0) suggest the bet pays off across distributions despite no real images entering training.

Two further hooks: (a) the prompt-curation recipe is reusable — VLM caption real images to bootstrap a style/content prompt gallery, then product them — and looks identical in spirit to PersonaPlex’s “back-annotate undirected Fisher audio with LLM persona prompts to make it directed” trick on Synthetic Training Data. (b) MegaStyle-Encoder is defined by its training data: a SigLIP image tower under supervised contrastive loss where the 170K fine-grained styles act as labels. This is structurally identical to how style transfer used to depend on hand-curated artist labels (CSD), but at 170× the label count and with intra-class consistency enforced by Qwen-Image rather than by curators. The dataset-as-encoder thesis is unusually clean here.