← all repositories
rosinality/style-based-gan-pytorch

StyleGAN, but you can actually read the PyTorch

A clean PyTorch reimplementation of NVIDIA's StyleGAN with pre-trained checkpoints up to 1024px.

1.1k stars Python Image · Video · Audio
style-based-gan-pytorch
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

Reimplements NVIDIA’s StyleGAN paper in PyTorch, letting you train progressive-resolution generators (8px to 1024px) on your own image datasets. Ships with conversion scripts that pre-resize images into LMDB for stable loading, plus separate training recipes for CelebA and FFHQ.

The interesting bit

The author publicly documented and fixed implementation bugs after community review—then retrained and re-released all checkpoints. That’s more maintenance transparency than most one-off research ports.

Key highlights

  • Pre-trained checkpoints at 256px, 512px, and 1024px (FFHQ)
  • Style mixing support built into training script (--mixing flag)
  • R1 regularization and scheduling options for FFHQ training
  • Docker image and web demo hosted on Replicate
  • Old checkpoints preserved but clearly labeled as deprecated

Caveats

  • No code examples for inference or sampling in the README—you’ll need to dig through the repo
  • Training requires LMDB prep step; not plug-and-play with standard folder datasets
  • 1024px checkpoint exists but only 512px samples are shown

Verdict

Worth a look if you need a hackable StyleGAN baseline in PyTorch and don’t mind filling in some inference glue. Skip if you want a batteries-included API or official NVIDIA support.

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