StyleGAN of All Trades: Image Manipulation with Only Pretrained StyleGAN

Min Jin Chong, Hsin-Ying Lee, David A. ForsytharXiv 2021

Abstract

Recent advancements in image synthesis have largely relied on specialized architectures and task-specific fine-tuning. This paper demonstrates that a standard, pretrained StyleGAN model possesses inherent versatility for a wide range of image manipulation tasks. By employing lightweight spatial operations and feature interpolations on intermediate layers, we achieve state-of-the-art results in panorama generation, attribute transfer, and image-to-image translation without additional training. Our findings suggest that the internal representations of StyleGAN are sufficiently disentangled and spatially aware to support diverse applications through minimal intervention.

Introduction

StyleGAN is renowned for its ability to generate high-fidelity images. However, adapting it for specific editing tasks—such as transforming a portrait into a stylized character or synthesizing expansive panoramas—traditionally requires complex "specialist" approaches involving new architectures or heavy retraining. This research investigates whether the standard StyleGAN architecture already contains the necessary "knowledge" for these tasks, accessible through simple manipulations of its internal feature maps. The authors propose a "minimal intervention" philosophy, showing that a "vanilla" pretrained model can be a "jack of all trades."

Overview of image manipulation tasks achieved using a pretrained StyleGAN, including panorama generation, feature interpolation, and attribute transfer.

Methods

The core of the proposed approach involves several lightweight techniques to repurpose the pretrained model:

  • Spatial Map Manipulation: Since StyleGAN is fully convolutional, the researchers found they could adjust the spatial dimensions of intermediate feature maps ($f_i$). By applying operations like Replicate Padding or Reflect Padding to early layers (specifically $f_2$), they could extend backgrounds or widen scenes naturally.
  • Feature Interpolation: Instead of simple collaging, which often leaves visible seams, they blend feature maps from two different images using a spatial mask ($\alpha$). Smoothly transitioning this mask enables seamless blending even between structurally different scenes.
  • Improved GAN Inversion: To edit real photos, the authors found that performing inversion in the $\sigma$ space (style coefficients) with a Gaussian prior—rather than the standard $W+$ space—led to much better reconstruction and easier editing.
  • Pose Alignment: For attribute transfer, they align the first 2048 dimensions of the $W+$ style code to ensure the source and reference faces have the same pose before the features are blended.

Key Results

The researchers compared their "StyleGAN of All Trades" (SOAT) against several state-of-the-art (SOTA) specialized models across datasets like FFHQ, LSUN, and LHQ:

  • User Preference: In a user study, 87.6% of participants preferred the authors' feature interpolation over previous SOTA methods. For single-image generation, 83.3% preferred SOAT over SinGAN.
  • Panorama Quality: Using the $\infty$-FID metric, their method achieved a score of 12.9, significantly better than the specialized ALIS model (10.5) when latent smoothing was applied.
  • Continuous Translation: Qualitative results show that SOAT can perform smooth, continuous translations between domains, such as turning a real face into a stylized character while preserving identity and expression.
Example of continuous image-to-image translation (toonification) achieved by manipulating style coefficients.

Conclusion

This work highlights the untapped potential of "vanilla" pretrained models. By simply "poking" the internal feature maps of StyleGAN, researchers can achieve results comparable to or better than specialized architectures. While limited by the biases and capacity of the original training data, this approach significantly reduces the complexity and computational cost of diverse image manipulation tasks. Future work may involve exploring these spatial operations in other generative architectures.

Summary updated

BibTeX
@misc{chong2021stylegan,
  author = {Min Jin Chong and Hsin-Ying Lee and David A. Forsyth},
  title = {{StyleGAN of All Trades: Image Manipulation with Only Pretrained StyleGAN}},
  year = {2021},
  eprint = {2111.01619},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.01619},
}
Figure