Source-linked AI summary

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

Junyao Gao, Sibo Liu, Jiaxing Li, Yanan Sun, Yuanpeng Tu, Fei Shen, Weidong Zhang, Cairong Zhao, Jun Zhang

arXiv:2604.08364v2cs.CV

TL;DR

Style-transfer research lacks datasets that are simultaneously intra-style consistent, inter-style diverse, and high quality, while self-supervised methods can leak content into style representations. MegaStyle uses consistent text-to-image style mapping to curate balanced prompts and generate MegaStyle-1.4M, then trains a style encoder and FLUX-based transfer model. Experiments report reliable style similarity measurement and generalizable, stable style transfer, although the pipeline remains limited by VLM generalization and Qwen-Image association biases.

  • Problem

    Existing self-supervised style-transfer methods make style–content disentanglement difficult, often causing content leakage and inferior stylized results.

  • Method

    MegaStyle uses VLM-captioned content and style prompts with consistent text-to-image style mapping to generate MegaStyle-1.4M, then applies style-supervised contrastive learning and trains MegaStyle-FLUX.

  • Results

    MegaStyle-Encoder provides reliable style similarity measurement, while MegaStyle-FLUX provides stable, generalizable style transfer and outperforms existing baselines.

  • Takeaways & Limitations

    The curated dataset supports style-specific representations and generalizable style transfer within the evaluated style-transfer setting.

  • Takeaways & Limitations

    VLMs may fail to recognize uncommon styles, and Qwen-Image can associate style prompts with biased semantic content such as historical Japanese imagery.

Abstract

from arXiv · show

In this paper, we introduce MegaStyle, a novel and scalable data curation pipeline that constructs an intra-style consistent, inter-style diverse and high-quality style dataset. We achieve this by leveraging the consistent text-to-image style mapping capability of current large generative models, which can generate images in the same style from a given style description. Building on this foundation, we curate a diverse and balanced prompt gallery with 170K style prompts and 400K content prompts, and generate a large-scale style dataset MegaStyle-1.4M via content-style prompt combinations. With MegaStyle-1.4M, we propose style-supervised contrastive learning to fine-tune a style encoder MegaStyle-Encoder for extracting expressive, style-specific representations, and we also train a FLUX-based style transfer model MegaStyle-FLUX. Extensive experiments demonstrate the importance of maintaining intra-style consistency, inter-style diversity and high-quality for style dataset, as well as the effectiveness of the proposed MegaStyle-1.4M. Moreover, when trained on MegaStyle-1.4M, MegaStyle-Encoder and MegaStyle-FLUX provide reliable style similarity measurement and generalizable style transfer, making a significant contribution to the style transfer community. More results are available at our project website https://jeoyal.github.io/MegaStyle/.

1. Introduction

Style transfer benefits from diffusion models but existing self-supervised methods can entangle style and content. MegaStyle addresses this with consistent text-to-image style mapping, balanced prompts, and large-scale paired generation.

  • Style transfer generates stylized images that follow both a reference style and user-provided content.
  • Existing methods often use self-supervised targets identical to reference images, making style–content disentanglement difficult and causing content leakage.These methods include trainable embeddings, adapters, or image-encoder style features.
  • Qwen-Image produces high-quality images with consistent style across different contents when given the same style prompt.This consistent mapping supports paired style-data generation.
  • MegaStyle curates 170K style prompts and 400K content prompts, then combines them to generate the MegaStyle-1.4M dataset.The prompt gallery is designed to be diverse and balanced.
  • MegaStyle-Encoder uses style-supervised contrastive learning, while MegaStyle-FLUX is trained for style transfer.Evaluations report reliable style similarity measurement and generalizable style transfer, with performance exceeding existing baselines.

2. Related Work

Style datasets and transfer methods have progressed from internet-scale collections and feature-based techniques to learned style encoders and paired synthesis. However, unreliable similarity measurement and content leakage remain recurring concerns.

  • Internet-collected datasets such as WikiArt, JourneyDB, and Style30K provide artworks or generated images but may contain style pairs with large intra-style discrepancies.The passage attributes this problem to unreliable style similarity measurement during curation.
  • Training-free diffusion-based transfer methods identify style in pretrained feature spaces but can produce reduced and unstable transfer performance.
  • Tuning-based methods learn style concepts through adapters, text embeddings, or network blocks, while image-encoder methods inject extracted style features into diffusion models.
  • Self-supervised style encoders often struggle to decouple style from content, leading to content leakage and inferior style transfer performance.Some methods instead generate paired samples sharing style while differing in content.
  • Style similarity is commonly measured through feature-space distances, Gram-matrix loss, or distribution distances such as FID and ArtFID.

3. MegaStyle

MegaStyle curates a large style dataset by combining balanced style and content prompts with a generative model’s consistent text-to-image style mapping. It then uses the dataset to train a style encoder and a FLUX-based style transfer model.

  • MegaStyle data curation: The pipeline collects style and content image pools, generates prompts with Qwen3-VL, balances them, and synthesizes style images with Qwen-Image.Its three stages are Image Pool Collection, Prompt Curation and Balance, and Style Image Generation.
  • MegaStyle data curation: Qwen3-VL describes style while excluding content, and Qwen-Image combines style and content prompts to generate images sharing a style across different contents.The style descriptions cover artistic style, color, lighting, medium, texture, and brushwork.
  • MegaStyle data curation: Deduplication followed by hierarchical-k-means balance sampling reduces redundancy and balances the prompt gallery.The two-stage process uses exact, fuzzy, and semantic deduplication before hierarchical clustering with mpnet embeddings.
  • MegaStyle-1.4M: MegaStyle-1.4M contains generated style images whose same-style examples exhibit strong intra-style consistency.The dataset is formed by sampling multiple content prompts for each style prompt.
  • MegaStyle-Encoder: MegaStyle-Encoder uses style-supervised contrastive learning with SigLIP features and an additional image–text contrastive loss for style representation.The objective uses same-style samples as positives and other samples as negatives, with only the image encoder updated during training.
  • MegaStyle-FLUX: MegaStyle-FLUX trains on same-style image pairs, conditioning FLUX on reference-style tokens and content text to produce stable, generalizable style transfer.Reference style tokens, noisy image tokens, and text tokens are processed by the FLUX MM-DiT backbone.

5. Implementation Details

MegaStyle-Encoder is evaluated for style-specific retrieval, while MegaStyle-FLUX is evaluated for style and text alignment against established baselines and alternative datasets. Across these evaluations, the proposed models and MegaStyle-1.4M show stronger retrieval, transfer, and human-preference outcomes.

  • Style similarity measurement: WikiArt is unsuitable for style-encoder evaluation because artist-based categories contain intra-style discrepancies and often similar image content.StyleRetrieval is introduced to provide fine-grained style evaluation, while additional benchmarks test performance beyond Qwen-Image’s distribution.
  • Style similarity measurement: MegaStyle-Encoder achieves substantially higher mAP and Recall than CSD, CLIP, and SigLIP across all tested backbones on StyleRetrieval.Top-1 visualizations show that MegaStyle-Encoder retrieves matching styles even without shared content, whereas other encoders rely more on content cues.
  • Style transfer: CSGO, DEADiff, and StyleCrafter transfer mainly basic colors, while StyleShot and StyleAligned show content leakage in qualitative comparisons.InstantStyle and Attention-Distillation tend to copy reference images and respond poorly to text prompts.
  • Style transfer: MegaStyle-FLUX achieves the highest text-alignment score, second-best style-alignment score, and highest human-preference scores among the compared style-transfer methods.Methods with high style alignment often copy reference content or respond poorly to text prompts, whereas MegaStyle-FLUX balances both criteria.
  • Style datasets: MegaStyle-1.4M enables StyleShot-FLUX-Mega to capture higher-level styles such as 3D, flat, and ink, outperforming StyleShot-FLUX across all metrics.The comparison uses the same base setting to assess the effect of training on MegaStyle-1.4M.

6. Conclusion

MegaStyle constructs a scalable style dataset through consistent text-to-image style mapping, then trains a style encoder and style-transfer model on MegaStyle-1.4M. Experiments report reliable style measurement and generalizable, stable transfer, while future work targets more precise style captioning and larger-scale data.

  • Conclusion: MegaStyle uses consistent text-to-image style mapping to curate MegaStyle-1.4M and train MegaStyle-Encoder and MegaStyle-FLUX.The pipeline targets intra-style consistency, inter-style diversity, and high quality.
  • Conclusion: MegaStyle-Encoder provides reliable style similarity measurement, while MegaStyle-FLUX provides generalizable and stable style transfer.The conclusion reports extensive experimental support for the data curation pipeline, dataset, and models.
  • Future work: Future work will refine VLM instruction prompts for style captioning and scale the dataset to the 10-million level.The stated motivation is to better cover visual aspects such as texture, brushwork, and medium and broaden the style space.

7. Implementation Details

The implementation uses VLM-generated content and style prompts, balanced prompt sampling, human preference evaluation, and controlled prompt templates. The style gallery emphasizes visual style attributes while content captions exclude style descriptions.

  • Prompt curation and balance: Prompt balancing removes exact, near, and semantic duplicates before four-level hierarchical clustering samples a balanced subset.The process leaves 1M prompts after deduplication and uses mpnet text embeddings for clustering.
  • Instruction templates: Style prompts describe artistic style, color, lighting, medium, texture, and brushwork while excluding recognizable subjects and environmental context.The prescribed output format begins with an artistic-style description and specifies the requested style attributes.
  • Instruction templates: Content prompts describe objects and their visual relationships while excluding color, lighting, texture, brushwork, medium, mood, and artistic-style descriptions.The content template is designed to keep content descriptions separate from style information.
  • Dataset statistics: The reported top artist-style proportions are individually low, with graphic illustration at 1.18% and watercolor illustration at 1.16%.Other listed styles include abstract expressionism at 1.15% and digital rendering at 1.12%.

8. Experiments

Experiments show that MegaStyle-1.4M supports stronger style transfer than Qwen-Image-Edit and that MegaStyle-FLUX outperforms alternative dataset and editing-model settings. The reported comparisons connect large-scale, high-quality style pairs with higher-level style capture.

  • Comparison with Qwen-Image-Edit: MegaStyle-FLUX significantly outperforms Qwen-Image-Edit on style transfer.The paper attributes this difference to Qwen-Image-Edit’s editing-pair training versus MegaStyle-FLUX’s training on large-scale, high-quality style image pairs.
  • Comparison with Qwen-Image-Edit: MegaStyle-1.4M is reported as necessary for training a style-transfer model that captures more than basic color attributes.The comparison states that training on large-scale, high-quality style image pairs supports the observed advantage.
  • Additional results: Additional supplementary material contains dataset visualizations, baseline comparisons, and further MegaStyle-FLUX stylized results.The listed figures include Figures 15–23.

9. Limitations

MegaStyle’s data-curation pipeline still has limitations rooted in the capabilities of its underlying vision–language and text-to-image models. These include difficulty recognizing uncommon styles and association bias in generated content.

  • Current VLMs have limited generalization, making uncommon styles difficult to recognize during data curation.
  • Qwen-Image exhibits association bias for some style prompts, linking “Japanese painting” with recurring historical Japanese imagery.Examples include kimono or yukata, traditional hairstyles, scroll-painting-like backgrounds, and ancient architecture.
  • The authors plan to improve dataset quality by tracking newer VLMs and text-to-image generation models.
Loading 2604.08364v2…