Progressive Growing of GANs
Module: Generative AI | Difficulty: Advanced
Progressive Growing
Fade-in
where increases from 0 to 1 during training.
StyleGAN2 Improvements
- Removed progressive growing
- Used style-based generator
- Added path length regularization
class ToRGB(nn.Module):
def __init__(self, in_ch, out_ch=3):
super().__init__()
self.conv = nn.Conv2d(in_ch, out_ch, 1)
def forward(self, x, alpha=1.0):
return self.conv(x)
class FadeIn(nn.Module):
def __init__(self, from_layer, to_layer):
super().__init__()
self.from_layer = from_layer
self.to_layer = to_layer
def forward(self, x, alpha):
return (1-alpha)*self.from_layer(x) + alpha*self.to_layer(x)
| Resolution | PGGAN (hours) | StyleGAN2 (hours) |
|---|---|---|
| 256x256 | 12 | 48 |
| 512x512 | 24 | 96 |
| 1024x1024 | 48 | 192 |
Research Insight: Progressive growing was crucial for early GANs but became unnecessary with better regularization (spectral norm, path length reg). StyleGAN2 shows that architectural improvements can replace training tricks.