MonoFormer: One Transformer for Both Diffusion and Autoregression

Chuyang Zhao, Yuxing Song, Wenhao Wang, Haocheng Feng, Errui Ding +3 more
9/24/2024
cs.CV

No official code found. Best implementation: MonoFormer/MonoFormer (92 stars, last commit 2024-10-12).

Abstract

Most existing multimodality methods use separate backbones for autoregression-based discrete text generation and diffusion-based continuous visual generation, or the same backbone by discretizing the visual data to use autoregression for both text and visual generation. In this paper, we propose to study a simple idea: share one transformer for both autoregression and diffusion. The feasibility comes from two main aspects: (i) Transformer is successfully applied to diffusion for visual generation, and (ii) transformer training for autoregression and diffusion is very similar, and the difference merely lies in that diffusion uses bidirectional attention mask and autoregression uses causal attention mask. Experimental results show that our approach achieves comparable image generation performance to current state-of-the-art methods as well as maintains the text generation capability. The project is publicly available at https://monoformer.github.io/.

View on arXivView PDF

Code Implementations(1)

The official implementation for "MonoFormer: One Transformer for Both Diffusion and Autoregression"

921Shell, PythonSep 24, 20242 years ago

Similar Papers

Cite this paper

@article{zhao2024monoformer,
  title  = {MonoFormer: One Transformer for Both Diffusion and Autoregression},
  author = {Chuyang Zhao and Yuxing Song and Wenhao Wang and Haocheng Feng and Errui Ding and Yifan Sun and Xinyan Xiao and Jingdong Wang},
  year   = {2024},
  eprint = {2409.16280},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.16280v1}
}

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/2409.16280.svg)](https://codeofpaper.com/paper/2409.16280)

Discussion