stylegan2_rosinality_discriminator
The residual critic of StyleGAN2, in rosinality's PyTorch port.
Diffusion and generative · 307 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
- 28.9M
- Operations
- 307
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR (arXiv 2019)
- Cited by
- 6,305 (as of 17 October 2026)
- Authors
- Tero Karras, Samuli Laine, Miika Aittala and others
- 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
- m10321
- Graph hash
- c62ee3defe1425a137cc1f480c5e5ac38080cd8a606c4ca7702e0b46142b6454
- Skeleton hash
- 8d5d9c2e2a324f1b519dbdbc253ece8677ac9b48ed633e78443f37f5766d1431
- Architecture hash
- 544c60444012b4d9ee0937fced46795d13a86ff7ab14588ff32ff09dbdc7bf86
- Diagram SHA-256
- 3f1318f159b0f1c93567bc9f42b55d596c5114c38fedb235658ecabe5f3029b1
- 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
This is the discriminator half of StyleGAN2, the redesign of the style-based GAN that its authors say redefines the state of the art in unconditional image modeling. The member traced here is the residual discriminator from rosinality's PyTorch port, whose author tried to match the official implementation as closely as possible while warning that some details may differ.
The paper compared three discriminator designs trained without progressive growing, the original feedforward network, skip connections and residual networks, and found that a residual discriminator is clearly beneficial for FID. The authors call this unsurprising, since a discriminator resembles a classifier, where residual architectures are known to help. A residual architecture was harmful in the generator, so the rest of the paper pairs a skip generator with a residual discriminator. Several details carry over from StyleGAN, including leaky ReLU activation with α = 0.2, bilinear filtering in the downsampling layers and a minibatch standard deviation layer at the end of the discriminator.
The final configuration, config F, doubled the number of feature maps in the highest-resolution layers of both networks after the authors hypothesized a capacity problem. That larger StyleGAN2 trains at 31 images per second, and its total training time was 9 days for FFHQ and 13 days for LSUN Car.
Key idea. A residual discriminator trained without progressive growing, which the paper's architecture comparison found clearly beneficial for FID.
- StyleGAN2
- StyleGAN2 discriminator
- StyleGAN2 residual discriminator
- stylegan2-pytorch
- rosinality
- GAN discriminator
- Karras
- Analyzing and Improving the Image Quality of StyleGAN
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{karras2020analyzingimprovingimagequality,
title={Analyzing and Improving the Image Quality of StyleGAN},
author={Tero Karras and Samuli Laine and Miika Aittala and Janne Hellsten and Jaakko Lehtinen and Timo Aila},
year={2020},
eprint={1912.04958},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1912.04958},
}