Resurrect Mask AutoRegressive Modeling for Efficient and Scalable Image Generation
Yi Xin, Le Zhuo, Qi Qin, Siqi Luo, Yuewen Cao, Bin Fu, Yangfan He, Hongsheng Li, Guangtao Zhai, Xiaohong Liu, Peng Gao
TL;DR
This work addresses the efficiency gap in image generation by resurrecting Mask AutoRegressive (MAR) models through careful tokenizer selection and architectural redesign. It introduces MaskGIL, a Bidirectional LLaMA-based MAR model with 2D RoPE, stabilized by QK-Norm and Post-Norm, achieving competitive or state-of-the-art quality with as few as 8 inference steps. The authors scale MaskGIL from 111M to 1.4B and extend to text-driven generation (775M) and practical applications, including a unified AR-MAR inference framework and a real-time speech-to-image system. The study demonstrates that combining AR-driven prompts with MAR completion yields substantial speedups while preserving fidelity, expanding MAR's applicability beyond static image generation to real-time and multimodal scenarios.
Abstract
AutoRegressive (AR) models have made notable progress in image generation, with Masked AutoRegressive (MAR) models gaining attention for their efficient parallel decoding. However, MAR models have traditionally underperformed when compared to standard AR models. This study refines the MAR architecture to improve image generation quality. We begin by evaluating various image tokenizers to identify the most effective one. Subsequently, we introduce an improved Bidirectional LLaMA architecture by replacing causal attention with bidirectional attention and incorporating 2D RoPE, which together form our advanced model, MaskGIL. Scaled from 111M to 1.4B parameters, MaskGIL achieves a FID score of 3.71, matching state-of-the-art AR models in the ImageNet 256x256 benchmark, while requiring only 8 inference steps compared to the 256 steps of AR models. Furthermore, we develop a text-driven MaskGIL model with 775M parameters for generating images from text at various resolutions. Beyond image generation, MaskGIL extends to accelerate AR-based generation and enable real-time speech-to-image conversion. Our codes and models are available at https://github.com/synbol/MaskGIL.
