StyleSwin: Transformer-based GAN for High-resolution Image Generation
Bowen Zhang, Shuyang Gu, Bo Zhang, Jianmin Bao, Dong Chen, Fang Wen, Yong Wang, Baining Guo
Abstract
Despite the tantalizing success in a broad of vision tasks, transformers have not yet demonstrated on-par ability as ConvNets in high-resolution image generative modeling. In this paper, we seek to explore using pure transformers to build a generative adversarial network for high-resolution image synthesis. To this end, we believe that local attention is crucial to strike the balance between computational efficiency and modeling capacity. Hence, the proposed generator adopts Swin transformer in a style-based architecture. To achieve a larger receptive field, we propose double attention which simultaneously leverages the context of the local and the shifted windows, leading to improved generation quality. Moreover, we show that offering the knowledge of the absolute position that has been lost in window-based transformers greatly benefits the generation quality. The proposed StyleSwin is scalable to high resolutions, with both the coarse geometry and fine structures benefit from the strong expressivity of transformers. However, blocking artifacts occur during high-resolution synthesis because performing the local attention in a block-wise manner may break the spatial coherency. To solve this, we empirically investigate various solutions, among which we find that employing a wavelet discriminator to examine the spectral discrepancy effectively suppresses the artifacts. Extensive experiments show the superiority over prior transformer-based GANs, especially on high resolutions, e.g., <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"></tex> 1024. The StyleSwin, without complex training strategies, excels over StyleGAN on CelebA-HQ 1024, and achieves on-par performance on FFHQ-1024, proving the promise of using transformers for high-resolution image generation. The code and pretrained models are available at https://github.com/microsoft/StyleSwin.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2eea6b50-3094-4eaf-a18c-dc561f16fae8Cited by top-tier papers53
- Retinexformer: One-stage Retinex-based Transformer for Low-light Image EnhancementYuanhao Cai, Hao Bian, Jing Lin, Haoqian Wang et al.ICCV 2023 · 615 citations
- Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion modelsGeorge Stein, Jesse C. Cresswell, Rasa Hosseinzadeh, Yi Sui et al.NeurIPS 2023 · 260 citations
- Improving Sample Quality of Diffusion Models Using Self-Attention GuidanceSusung Hong, Gyuseong Lee, Wooseok Jang, Seungryong KimICCV 2023 · 167 citations
- The GAN is dead; long live the GAN! A Modern GAN BaselineNick Huang, Aaron Gokaslan, Volodymyr Kuleshov, James TompkinNeurIPS 2024 · 111 citations
- Relay Diffusion: Unifying diffusion process across resolutions for image synthesisJiayan Teng, Wendi Zheng, Ming Ding, Wenyi Hong et al.ICLR 2024 · 84 citations
Builds on31
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
Related papers
- Swin-UNIT: Transformer-based GAN for High-resolution Unpaired Image TranslationYifan Li, Yaochen Li, Wenneng Tang, Zhifeng Zhu et al.ACM MM 2023 · 13 citations
- TransGAN: Two Pure Transformers Can Make One Strong GAN, and That Can Scale UpYifan Jiang, Shiyu Chang, Zhangyang WangNeurIPS 2021 · 515 citations
- Improved Transformer for High-Resolution GANsLong Zhao, Zizhao Zhang, Ting Chen, Dimitris N. Metaxas et al.NeurIPS 2021 · 117 citations
- SWAGAN: a style-based wavelet-driven generative modelRinon Gal, Dana Cohen Hochberg, Amit Bermano, Daniel Cohen-OrSIGGRAPH 2021 · 96 citations
- Styleformer: Transformer based Generative Adversarial Networks with Style VectorJeeseung Park, Younggeun KimCVPR 2022 · 49 citations
