Wanggui He1,*,
Siming Fu1,*,
Mushui Liu2,*,
Xierui Wang2,+ ,
Wenyi Xiao, 2,+
Fangxun Shu1,+,
Yi Wang2 ,
Lei Zhang2,
Zhelun Yu3,
Haoyuan Li2 ,
Ziwei Huang2,
LeiLei Gan2,
Hao Jiang1,†
1 Alibaba Group 2 Zhejiang University 3 Fudan University
*Equal contribution +Core contributor †Corresponding author
This repository contains the official implementation of the paper "MARS: Mixture of Auto-Regressive Models for Fine-grained Text-to-image Synthesis".
Auto-regressive models have made significant progress in the realm of language generation, yet do not perform on par with diffusion models in the domain of image synthesis. In this work, we introduce MARS, a novel framework for T2I generation that incorporates a specially designed Semantic Vision-Language Integration Expert (SemVIE). This innovative component integrates pre-trained LLMs by independently processing linguistic and visual information—freezing the textual component while fine-tuning the visual component. This methodology preserves the NLP capabilities of LLMs while imbuing them with exceptional visual understanding. Building upon the powerful base of the pre-trained Qwen-7B, MARS stands out with its bilingual generative capabilities corresponding to both English and Chinese language prompts and the capacity for joint image and text generation. The flexibility of this framework lends itself to migration towards any-to-any task adaptability. Furthermore, MARS employs a multi-stage training strategy that first establishes robust image-text alignment through complementary bidirectional tasks and subsequently concentrates on refining the T2I generation process, significantly augmenting text-image synchrony and the granularity of image details. Notably, MARS requires only 9% of the GPU days needed by SD1.5, yet it achieves remarkable results across a variety of benchmarks, illustrating the training efficiency and the potential for swift deployment in various applications.
git clone https://github.com/fusiming3/MARS.git
cd MARS
pip install -r requirements.txt
The code and ckpts are currently undergoing internal review. Please stay tuned!
- paper
- inference code
- model weights
- training code
This repository is built based on the fancy, robust, and extensible work of Qwen and muse. We also thank HuggingFace for their contribution to the open source community.