# Style Transformer for Image Inversion and Editing

arXiv: https://arxiv.org/abs/2203.07932 · HTML: https://mlsanity.com/paper/2203.07932/

## Key facts

- Cited by 37 papers in the map (data through 14 Oct 2026).
- Builds on 41 of its 48 references that are in the map.
- First posted on arXiv 15 Mar 2022.

## Builds on (most cited first, 30 of 41)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [The Unreasonable Effectiveness of Deep Features as a Perceptual Metric](https://mlsanity.com/paper/1801.03924/) (2018)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [A Style-Based Generator Architecture for Generative Adversarial Networks](https://mlsanity.com/paper/1812.04948/) (2018)
- [Neural Discrete Representation Learning](https://mlsanity.com/paper/1711.00937/) (2017)
- [Analyzing and Improving the Image Quality of StyleGAN](https://mlsanity.com/paper/1912.04958/) (2019)
- [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://mlsanity.com/paper/2010.04159/) (2020)
- [Progressive Growing of GANs for Improved Quality, Stability, and Variation](https://mlsanity.com/paper/1710.10196/) (2017)
- [Large Scale GAN Training for High Fidelity Natural Image Synthesis](https://mlsanity.com/paper/1809.11096/) (2018)
- [Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization](https://mlsanity.com/paper/1703.06868/) (2017)
- [Generating Diverse High-Fidelity Images with VQ-VAE-2](https://mlsanity.com/paper/1906.00446/) (2019)
- [LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loop](https://mlsanity.com/paper/1506.03365/) (2015)
- [StarGAN v2: Diverse Image Synthesis for Multiple Domains](https://mlsanity.com/paper/1912.01865/) (2019)
- [Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning](https://mlsanity.com/paper/1704.03976/) (2017)
- [Object-Centric Learning with Slot Attention](https://mlsanity.com/paper/2006.15055/) (2020)
- [On the Variance of the Adaptive Learning Rate and Beyond](https://mlsanity.com/paper/1908.03265/) (2019)
- [Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation](https://mlsanity.com/paper/2008.00951/) (2020)
- [Image2StyleGAN: How to Embed Images Into the StyleGAN Latent Space?](https://mlsanity.com/paper/1904.03189/) (2019)
- [GANSpace: Discovering Interpretable GAN Controls](https://mlsanity.com/paper/2004.02546/) (2020)
- [Designing an Encoder for StyleGAN Image Manipulation](https://mlsanity.com/paper/2102.02766/) (2021)
- [In-Domain GAN Inversion for Real Image Editing](https://mlsanity.com/paper/2004.00049/) (2020)
- [Closed-Form Factorization of Latent Semantics in GANs](https://mlsanity.com/paper/2007.06600/) (2020)
- [InterFaceGAN: Interpreting the Disentangled Face Representation Learned by GANs](https://mlsanity.com/paper/2005.09635/) (2020)
- [Image2StyleGAN++: How to Edit the Embedded Images?](https://mlsanity.com/paper/1911.11544/) (2019)
- [StyleFlow: Attribute-conditioned Exploration of StyleGAN-Generated Images using Conditional Continuous Normalizing Flows](https://mlsanity.com/paper/2008.02401/) (2020)
- [Generative Visual Manipulation on the Natural Image Manifold](https://mlsanity.com/paper/1609.03552/) (2016)
- [Lookahead Optimizer: k steps forward, 1 step back](https://mlsanity.com/paper/1907.08610/) (2019)

## Built on by (most cited first, 30 of 37)

- [Learning Generative Structure Prior for Blind Text Image Super-resolution](https://mlsanity.com/paper/2303.14726/) (2023)
- [Personalized Image Generation with Deep Generative Models: A Decade Survey](https://mlsanity.com/paper/2502.13081/) (2025)
- [Delving StyleGAN Inversion for Image Editing: A Foundation Latent Space Viewpoint](https://mlsanity.com/paper/2211.11448/) (2022)
- [GAN-based Facial Attribute Manipulation](https://mlsanity.com/paper/2210.12683/) (2022)
- [Image-to-Image Translation with Disentangled Latent Vectors for Face Editing](https://mlsanity.com/paper/2301.04628/) (2023)
- [CLIP-Guided StyleGAN Inversion for Text-Driven Real Image Editing](https://mlsanity.com/paper/2307.08397/) (2023)
- [PREIM3D: 3D Consistent Precise Image Attribute Editing from a Single Image](https://mlsanity.com/paper/2304.10263/) (2023)
- [Adaptive Nonlinear Latent Transformation for Conditional Face Editing](https://mlsanity.com/paper/2307.07790/) (2023)
- [Controllable 3D Face Generation with Conditional Style Code Diffusion](https://mlsanity.com/paper/2312.13941/) (2023)
- [IA-FaceS: A Bidirectional Method for Semantic Face Editing](https://mlsanity.com/paper/2203.13097/) (2022)
- [Contrastive Decoupled Representation Learning and Regularization for Speech-Preserving Facial Expression Manipulation](https://mlsanity.com/paper/2504.05672/) (2025)
- [Warping the Residuals for Image Editing with StyleGAN](https://mlsanity.com/paper/2312.11422/) (2023)
- [LatentSwap3D: Semantic Edits on 3D Image GANs](https://mlsanity.com/paper/2212.01381/) (2022)
- [NeRFEditor: Differentiable Style Decomposition for Full 3D Scene Editing](https://mlsanity.com/paper/2212.03848/) (2022)
- [Video Coding Using Learned Latent GAN Compression](https://mlsanity.com/paper/2207.04324/) (2022)
- [Fix the Noise: Disentangling Source Feature for Controllable Domain Translation](https://mlsanity.com/paper/2303.11545/) (2023)
- [SD-GAN: Semantic Decomposition for Face Image Synthesis with Discrete Attribute](https://mlsanity.com/paper/2207.05300/) (2022)
- [GAN Inversion for Image Editing via Unsupervised Domain Adaptation](https://mlsanity.com/paper/2211.12123/) (2022)
- [Out-of-domain GAN inversion via Invertibility Decomposition for Photo-Realistic Human Face Manipulation](https://mlsanity.com/paper/2212.09262/) (2022)
- [Learning Spatial-Temporal Coherent Correlations for Speech-Preserving Facial Expression Manipulation](https://mlsanity.com/paper/2604.20226/) (2026)
- [Meta-Auxiliary Network for 3D GAN Inversion](https://mlsanity.com/paper/2305.10884/) (2023)
- [StylePrompter: All Styles Need Is Attention](https://mlsanity.com/paper/2307.16151/) (2023)
- [Exploring Attribute Variations in Style-based GANs using Diffusion Models](https://mlsanity.com/paper/2311.16052/) (2023)
- [Gradual Residuals Alignment: A Dual-Stream Framework for GAN Inversion and Image Attribute Editing](https://mlsanity.com/paper/2402.14398/) (2024)
- [Pre-trained Multiple Latent Variable Generative Models are good defenders against Adversarial Attacks](https://mlsanity.com/paper/2412.03453/) (2024)
- [More comprehensive facial inversion for more effective expression recognition](https://mlsanity.com/paper/2211.13564/) (2022)
- [StyleRes: Transforming the Residuals for Real Image Editing with StyleGAN](https://mlsanity.com/paper/2212.14359/) (2022)
- [Domain Agnostic Image-to-image Translation using Low-Resolution Conditioning](https://mlsanity.com/paper/2305.05023/) (2023)
- [Robust GAN inversion](https://mlsanity.com/paper/2308.16510/) (2023)
- [Subjective Face Transform using Human First Impressions](https://mlsanity.com/paper/2309.15381/) (2023)

## Abstract (arXiv)

Existing GAN inversion methods fail to provide latent codes for reliable reconstruction and flexible editing simultaneously. This paper presents a transformer-based image inversion and editing model for pretrained StyleGAN which is not only with less distortions, but also of high quality and flexibility for editing. The proposed model employs a CNN encoder to provide multi-scale image features as keys and values. Meanwhile it regards the style code to be determined for different layers of the generator as queries. It first initializes query tokens as learnable parameters and maps them into W+ space. Then the multi-stage alternate self- and cross-attention are utilized, updating queries with the purpose of inverting the input by the generator. Moreover, based on the inverted code, we investigate the reference- and label-based attribute editing through a pretrained latent classifier, and achieve flexible image-to-image translation with high quality results. Extensive experiments are carried out, showing better performances on both inversion and editing tasks within StyleGAN.
