StyleMapGAN
A GAN whose latent is an 8×8 stylemap, so an encoder can reconstruct and locally edit real images.
Diffusion and generative · 863 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 97.4M
- Operations
- 863
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2021
- Cited by
- 1 (as of 28 October 2026)
- Authors
- Hyunsu Kim, Yunjey Choi, Junho Kim and others
- Source
- GitHub: naver-ai/StyleMapGAN
- License
- CC-BY-NC-4.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m20640
- Graph hash
- c991767679bfba03008aa05cb669954de92c020a4a428adba98b50a6ff535ae8
- Skeleton hash
- 50dc568b97c921f324a63e532b3e30894a19031d345a09d2d18d617b72d33ea9
- Architecture hash
- 4ef3aef69e89b31b57c714c9ad1c91924aa7a0c383f734b066a39a4764673930
- Diagram SHA-256
- c6a2c9cd322126ae879699daab2262709be056360496d56fa2cd1caa06d0299a
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
StyleMapGAN is a GAN designed for editing real photographs: an encoder projects an image into the latent space in real time, and the image is then manipulated there. The paper attributes the low fidelity of earlier encoder-based projection to the absence of spatial dimensions in the latent space.
The proposed fix is the stylemap: instead of a vector-based latent representation, the model uses a tensor with explicit spatial dimensions. The mapping network has a reshape layer at the end to produce the stylemap. A stylemap resizer, made of convolutions and upsampling, then matches the stylemap to the resolution of each feature map in the synthesis network. A spatially variant modulation replaces AdaIN. The per-pixel noise of StyleGAN is removed, because the stylemap already provides spatially varying inputs.
Because the latent has a spatial layout, specific regions of an image can be edited by manipulating the matching positions of the stylemap. The discriminator is the same as StyleGAN2, and the encoder's architecture is similar to the discriminator's except without minibatch discrimination. After comparing stylemap resolutions on editing quality and interpolation FID, the authors chose 8×8 and used it for all subsequent experiments.
Key idea. StyleMapGAN gives the intermediate latent space spatial dimensions and replaces AdaIN with a spatially variant modulation, so an encoder can embed real images accurately for real-time editing.
- StyleMapGAN
- stylemap
- GAN inversion
- real-time image editing
- local editing
- image projection
- spatial latent space
- image interpolation
- GAN encoder
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{kim2021exploitingspatialdimensionslatent,
title={Exploiting Spatial Dimensions of Latent in GAN for Real-time Image Editing},
author={Hyunsu Kim and Yunjey Choi and Junho Kim and Sungjoo Yoo and Youngjung Uh},
year={2021},
eprint={2104.14754},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2104.14754},
}