Efficient Image Generation with Variadic Attention Heads

Steven Walton, Ali Hassani, Xingqian Xu, Zhangyang Wang, Humphrey Shi
11/10/2022
25 citations
cs.CVcs.AIcs.LG
transformer-attention

Official code: SHI-Labs/StyleNAT (102 stars, Python, MIT, last commit 2025-06-26).

Abstract

While the integration of transformers in vision models have yielded significant improvements on vision tasks they still require significant amounts of computation for both training and inference. Restricted attention mechanisms significantly reduce these computational burdens but come at the cost of losing either global or local coherence.

Show full abstract

We propose a simple, yet powerful method to reduce these trade-offs: allow the attention heads of a single transformer to attend to multiple receptive fields. We demonstrate our method utilizing Neighborhood Attention (NA) and integrate it into a StyleGAN based architecture for image generation. With this work, dubbed StyleNAT, we are able to achieve a FID of 2.05 on FFHQ, a 6% improvement over StyleGAN-XL, while utilizing 28% fewer parameters and with 4$\times$ the throughput capacity. StyleNAT achieves the Pareto Frontier on FFHQ-256 and demonstrates powerful and efficient image generation on other datasets. Our code and model checkpoints are publicly available at: https://github.com/SHI-Labs/StyleNAT

View on arXivView PDF

Code Implementations(1)

SHI-Labs/StyleNATOfficial100%
MIT

New flexible and efficient image generation framework that sets new SOTA on FFHQ-256 with FID 2.05, 2022

10213Python, CudaNov 9, 20221 years agoMIT
ganimage-generationneighborhood-attention

Similar Papers

Cite this paper

@article{walton2022efficient,
  title  = {Efficient Image Generation with Variadic Attention Heads},
  author = {Steven Walton and Ali Hassani and Xingqian Xu and Zhangyang Wang and Humphrey Shi},
  year   = {2022},
  eprint = {2211.05770},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.05770}
}

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

Discussion