← all repositories
NVlabs/stylegan2

NVIDIA's follow-up GAN fixes artifacts and makes fakes traceable

It redesigns StyleGAN's architecture to squash characteristic artifacts and make generated images invertible for forgery detection.

11.2k stars Python Image · Video · Audio
stylegan2
Not currently ranked — collecting fresh signals.
star history

What it does This is NVIDIA’s official TensorFlow implementation of the StyleGAN2 research paper. It generates high-resolution synthetic images—faces, cars, cats, churches, horses—by re-architecting the original StyleGAN generator to remove characteristic artifacts. The codebase covers training from scratch, loading pretrained networks, projecting photos back into latent space, and computing standard quality metrics.

The interesting bit The authors treated the GAN like a debugging exercise: they identified specific artifacts and capacity bottlenecks, then redesigned generator normalization and revisited progressive growing to fix them. A side effect of the new path-length regularizer is that the generator becomes easier to invert, so you can recover a latent vector from a generated image and reliably detect whether a particular network produced it.

Key highlights

  • Pre-trained checkpoints for FFHQ (1024×1024), LSUN Car (512×384), and LSUN Cat, Church, and Horse (256×256)
  • Custom TensorFlow operations compiled on-the-fly via NVCC; Linux recommended, Windows supported with Visual Studio in PATH
  • Locked to TensorFlow 1.14 or 1.15; TensorFlow 2.x is explicitly unsupported
  • Reproducing the full FFHQ paper results at 1024×1024 requires GPUs with at least 16 GB of memory
  • Includes projection tools to recover latent vectors from both real and generated images

Caveats

  • The dependency stack is frozen circa 2019: TensorFlow 1.x, CUDA 10.0, and cuDNN 7.5
  • NVIDIA now points users to StyleGAN2-ADA-PyTorch for new work
  • Training times are substantial: roughly seventy days on a single GPU or just under ten days on eight Tesla V100s for the full FFHQ configuration

Verdict Use this if you need the exact TensorFlow implementation for paper reproduction or baseline comparisons. For new projects, NVIDIA’s newer PyTorch release is the pragmatic choice.

Frequently asked

What is NVlabs/stylegan2?
It redesigns StyleGAN's architecture to squash characteristic artifacts and make generated images invertible for forgery detection.
Is stylegan2 open source?
Yes — NVlabs/stylegan2 is an open-source project tracked on heatdrop.
What language is stylegan2 written in?
NVlabs/stylegan2 is primarily written in Python.
How popular is stylegan2?
NVlabs/stylegan2 has 11.2k stars on GitHub.
Where can I find stylegan2?
NVlabs/stylegan2 is on GitHub at https://github.com/NVlabs/stylegan2.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.