Abstract
Recently, CLIP-guided image synthesis has shown appealing performance on adapting a pre-trained source-domain generator to an unseen target domain. It does not require any target-domain samples but only the textual domain labels. The training is highly efficient, e.g., a few minutes. However, existing methods still have some limitations in the quality of generated images and may suffer from the mode collapse issue. A key reason is that a fixed adaptation direction is applied for all cross-domain image pairs, which leads to identical supervision signals. To address this issue, we propose an Image-specific Prompt Learning (IPL) method, which learns specific prompt vectors for each source-domain image. This produces a more precise adaptation direction for every cross-domain image pair, endowing the target-domain generator with greatly enhanced flexibility. Qualitative and quantitative evaluations on various domains demonstrate that IPL effectively improves the quality and diversity of synthesized images and alleviates the mode collapse. Moreover, IPL is independent of the structure of the generative model, such as generative adversarial networks or diffusion models.
The Challenge of Fixed Adaptation
Generative models like StyleGAN are highly effective at creating realistic imagery, but adapting them to new artistic domains (e.g., transforming "Photos" into "Disney characters") typically requires large datasets. Zero-shot adaptation leverages pre-trained vision-language models like CLIP to guide the generator using only text descriptions.
However, current state-of-the-art methods, such as StyleGAN-NADA, often rely on a fixed adaptation direction. By applying the same textual guidance to every source image, these models frequently suffer from "mode collapse." This results in homogeneous artifacts across diverse inputs—for instance, every generated face might exhibit identical squinty eyes or specific color distortions regardless of the original features.
Image-Specific Prompt Learning (IPL)
To overcome these limitations, we introduce Image-specific Prompt Learning (IPL). Instead of a global, one-size-fits-all prompt, IPL generates personalized guidance for each individual image. The method operates in two distinct stages:
- Latent Mapper Training: A small neural network is trained to map a source image's latent code to a set of learnable prompt vectors in the CLIP embedding space. This stage employs contrastive learning to ensure prompts are unique to each image and domain regularization to maintain alignment with the target style without conflicting with essential source features.
- Generator Adaptation: The trained mapper provides precise, image-specific directions during the adaptation process. This flexibility allows the generator to adopt the target style while preserving the unique structural identity of the source image.
Experimental Results
IPL was evaluated across multiple source domains (FFHQ, AFHQ-Dog) and diverse target styles, including Disney, Anime, and Ukiyo-e.
Visual and Quantitative Improvements
IPL effectively eliminates the homogeneous patterns prevalent in baseline methods. In the "Photo to Disney" task, IPL preserved individual expressions and facial structures that were previously lost to generic styling. Quantitatively, IPL achieved an Inception Score (IS) of 3.089 in the Disney task, a significant improvement over the baseline's 2.721. Furthermore, a user study involving 121 participants showed an 80.5% preference for IPL-generated images.
Efficiency and Versatility
Despite the added complexity of image-specific prompts, IPL remains highly efficient, with training completed in 10–20 minutes on a single NVIDIA RTX 3090. Crucially, the method is model-agnostic; its successful application to both GANs and Diffusion models (e.g., Diff-CLIP) demonstrates that image-specific guidance is a robust solution for zero-shot generative tasks.
Conclusion and Future Work
IPL represents a significant step forward in zero-shot model adaptation by identifying supervision as the primary bottleneck for diversity. While the learned prompt vectors currently lack direct human interpretability, their ability to capture nuance beyond discrete language is clear. Future research will focus on extreme domain shifts and the ethical implications of high-fidelity style transfer.
Code is available at: https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation
Summary updated