One-Shot Adaptation of GAN in Just One CLIP

Gihyun Kwon, Jong Chul Ye · OpenReview

Abstract

There are many recent research efforts to fine-tune a pre-trained generator with a few target images to generate images of a novel domain. Unfortunately, these methods often suffer from overfitting or under-fitting when fine-tuned with a single target image. To address this, here we present a novel single-shot GAN adaptation method through unified CLIP space manipulations. Specifically, our model employs a two-step training strategy: reference image search in the source generator using a CLIP-guided latent optimization, followed by generator fine-tuning with a novel loss function that imposes CLIP space consistency between the source and adapted generators. To further improve the adapted model to produce spatially consistent samples with respect to the source generator, we also propose contrastive regularization for patchwise relationships in the CLIP space. Experimental results show that our model generates diverse outputs with the target texture and outperforms the baseline models both qualitatively and quantitatively. Furthermore, we show that our CLIP space manipulation strategy allows more effective attribute editing.

Introduction

Fine-tuning a Generative Adversarial Network (GAN) usually requires thousands of images. "Few-shot" adaptation attempts to reduce this requirement, but "one-shot" adaptation—using exactly one target image—remains a significant challenge. Existing methods often fall into two traps: overfitting, where the generator memorizes the single target image and loses diversity, or underfitting, where the model fails to capture complex artistic nuances, only changing global colors. This paper introduces a novel method to bridge this gap by ensuring the adapted model inherits the semantic richness of the target while maintaining the structural integrity of the source model.

Methodology

The authors propose a two-step strategy centered entirely around the CLIP (Contrastive Language-Image Pre-training) embedding space.

Before fine-tuning, the model searches the source generator’s latent space to find a reference image ($I_{ref}$) that semantically matches the target image ($I_{trg}$). By using CLIP embeddings instead of pixel-wise similarity, the method can find a source image with a matching pose or expression, providing a stable anchor for the adaptation process.

Generator Fine-tuning

Once the reference is identified, the generator is fine-tuned using three primary losses:

  • Cross-domain Semantic Consistency ($L_{con}$): Ensures that the relative semantic distances between generated images in the CLIP space remain consistent before and after adaptation.
  • Patch-wise Semantic Consistency ($L_{patch}$): A key innovation that applies contrastive learning to small image patches. This forces the model to maintain local structural relationships (like the shape of an eye) while adopting the target texture.
  • Reference Target Alignment: Explicitly aligns the reference latent code to the target image's appearance.

Results and Discussion

The method was evaluated across multiple domains, including human faces (FFHQ), churches, cars, and dogs, using various artistic target styles.

Qualitative results of one-shot GAN adaptation across various domains and styles.

Qualitative and Quantitative Performance

As illustrated in the results, the model produces images that adopt target textures (e.g., charcoal strokes or oil painting styles) while perfectly preserving the identity and pose of the source images. Quantitatively, the proposed method achieved superior FID (Fréchet Inception Distance) scores compared to state-of-the-art baselines. For example, in sketch adaptation, it achieved an FID of 83.87, significantly better than the 107.2 achieved by the next best baseline. A user study with 30 participants further confirmed a preference for this method due to its balance of style transfer and content preservation.

Conclusion

By leveraging CLIP as a universal regularizer and introducing patch-based contrastive loss, this work successfully decouples style from structure in one-shot GAN adaptation. While minor background artifacts remain a challenge, the unified CLIP manipulation strategy offers a robust framework for diverse and semantically consistent image generation. Future research will explore extending these techniques to natural image adaptation and newer architectures like Diffusion Models.

Summary updated

BibTeX
@article{kwon2023one,
  author = {Gihyun Kwon and Jong Chul Ye},
  title = {{One-Shot Adaptation of GAN in Just One CLIP}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=Zz65pYIH-d},
}
Figure