Improved Transformer for High-Resolution GANs

Long Zhao, Zizhao Zhang, Ting Chen, Dimitris N. Metaxas, Han Zhang
6/14/2021
cs.CV
transformer-attention

Official code: google-research/hit-gan (93 stars, Python, Apache-2.0, TensorFlow, last commit 2024-07-30).

Abstract

Attention-based models, exemplified by the Transformer, can effectively model long range dependency, but suffer from the quadratic complexity of self-attention operation, making them difficult to be adopted for high-resolution image generation based on Generative Adversarial Networks (GANs). In this paper, we introduce two key ingredients to Transformer to address this challenge.

Show full abstract

First, in low-resolution stages of the generative process, standard global self-attention is replaced with the proposed multi-axis blocked self-attention which allows efficient mixing of local and global attention. Second, in high-resolution stages, we drop self-attention while only keeping multi-layer perceptrons reminiscent of the implicit neural function. To further improve the performance, we introduce an additional self-modulation component based on cross-attention. The resulting model, denoted as HiT, has a nearly linear computational complexity with respect to the image size and thus directly scales to synthesizing high definition images. We show in the experiments that the proposed HiT achieves state-of-the-art FID scores of 30.83 and 2.95 on unconditional ImageNet $128 \times 128$ and FFHQ $256 \times 256$, respectively, with a reasonable throughput. We believe the proposed HiT is an important milestone for generators in GANs which are completely free of convolutions. Our code is made publicly available at https://github.com/google-research/hit-gan

View on arXivView PDF

Code Implementations(1)

TensorFlowApache-2.0

Tensorflow implementation for "Improved Transformer for High-Resolution GANs" (NeurIPS 2021).

937PythonDec 13, 20212 years agoApache-2.0
generative-adversarial-networktensorflowvision-transformer

Similar Papers

Cite this paper

@article{zhao2021improved,
  title  = {Improved Transformer for High-Resolution GANs},
  author = {Long Zhao and Zizhao Zhang and Ting Chen and Dimitris N. Metaxas and Han Zhang},
  year   = {2021},
  eprint = {2106.07631},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.07631}
}

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

Discussion