Scalable Autoregressive Image Generation with Mamba

Haopeng Li, Jinyue Yang, Kexin Wang, Xuerui Qiu, Yuhong Chou +2 more
8/22/2024
29 citations
cs.CV
state-space-mamba

Official code: hp-l33/AiM (148 stars, Python, MIT, last commit 2025-01-13).

Abstract

We introduce AiM, an autoregressive (AR) image generative model based on Mamba architecture. AiM employs Mamba, a novel state-space model characterized by its exceptional performance for long-sequence modeling with linear time complexity, to supplant the commonly utilized Transformers in AR image generation models, aiming to achieve both superior generation quality and enhanced inference speed.

Show full abstract

Unlike existing methods that adapt Mamba to handle two-dimensional signals via multi-directional scan, AiM directly utilizes the next-token prediction paradigm for autoregressive image generation. This approach circumvents the need for extensive modifications to enable Mamba to learn 2D spatial representations. By implementing straightforward yet strategically targeted modifications for visual generative tasks, we preserve Mamba's core structure, fully exploiting its efficient long-sequence modeling capabilities and scalability. We provide AiM models in various scales, with parameter counts ranging from 148M to 1.3B. On the ImageNet1K 256*256 benchmark, our best AiM model achieves a FID of 2.21, surpassing all existing AR models of comparable parameter counts and demonstrating significant competitiveness against diffusion models, with 2 to 10 times faster inference speed. Code is available at https://github.com/hp-l33/AiM

View on arXivView PDF

Code Implementations(1)

hp-l33/AiMOfficial100%
MIT

Official PyTorch Implementation of "Scalable Autoregressive Image Generation with Mamba"

1485PythonJul 16, 20241 years agoMIT
auto-regressive-modelimage-generationmamba

Similar Papers

Cite this paper

@article{li2024scalable,
  title  = {Scalable Autoregressive Image Generation with Mamba},
  author = {Haopeng Li and Jinyue Yang and Kexin Wang and Xuerui Qiu and Yuhong Chou and Xin Li and Guoqi Li},
  year   = {2024},
  eprint = {2408.12245},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.12245v5}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.12245.svg)](https://codeofpaper.com/paper/2408.12245)

Discussion