Few-Shot Image Generation by Conditional Relaxing Diffusion Inversion

Yu Cao, Shaogang Gong

Introduction

Few-Shot Image Generation (FSIG) represents a significant challenge in computer vision: the goal is to synthesize high-quality, diverse images belonging to a specific target domain (such as "sketches" or "babies") using only a minimal set of training examples—often as few as ten. While Diffusion Models (DMs) have set new benchmarks for image synthesis, their application to FSIG is fraught with difficulties. Standard fine-tuning approaches on massive diffusion models typically result in overfitting, where the model memorizes the few training samples exactly, or catastrophic forgetting, where the model loses the rich prior knowledge acquired during large-scale pre-training.

To address these issues, researchers have introduced Conditional Relaxing Diffusion Inversion (CRDI). CRDI is a training-free framework that bypasses weight updates entirely, instead leveraging the inherent generative power of pre-trained models through a novel guidance mechanism.

Methodology

CRDI operates through a two-step process designed to extract and then manipulate the latent representations within a frozen diffusion model.

1. Sample-wise Guidance Embedding (SGE)

Rather than modifying the model's parameters, CRDI searches for a unique Sample-wise Guidance Embedding (SGE) for each target image. This SGE acts as a dynamic guidance signal, effectively providing DMs with a manipulatable latent space similar to those found in Generative Adversarial Networks (GANs). By optimizing this embedding, the pre-trained model can accurately reconstruct specific target samples without losing its general knowledge.

2. Conditional Relaxing and Diversity Enhancement

To generate new, diverse images rather than just replicas, the framework introduces two key components:

  • Conditional Relaxing: The authors introduce a "degree of rigidity" parameter ($\eta$). By adjusting how strictly the model follows the SGE across different diffusion timesteps, the system can balance reconstruction accuracy with creative freedom. High rigidity ensures the output matches the target domain precisely, while lower rigidity allows the model to draw more heavily from its pre-trained source domain.
  • Diversity Perturbation: To further boost variation, an annealing noise perturbation scheduler is applied to the SGE during the generation process. This allows the model to produce diverse variations of the target domain while maintaining the structural and stylistic essence of the few-shot samples.

To ensure stability, the method utilizes a "set-wise" penalty, averaging SGEs across the available samples to provide a robust, generalized direction for the transformation.

Experimental Results

The researchers evaluated CRDI across a wide range of target domains, including FFHQ-Babies, Face Sketches, Bitmojis, and MetFaces, using a model pre-trained on the Flickr Faces HQ (FFHQ) dataset.

Quality and Diversity

CRDI consistently outperformed traditional GAN-based methods in reconstruction accuracy. In terms of generative quality, CRDI achieved an FID score of 24.62 in the "Sunglasses" category, surpassing the state-of-the-art fine-tuning method RICK (25.22).

Mode Coverage

On the complex MetFaces dataset—which includes diverse media such as ceramics and paintings—CRDI achieved a superior MC-SSIM score of 0.78. This indicates that the method captures the breadth of the target domain effectively, avoiding the mode collapse often seen in methods that converge on a single style.

One-Shot Generation

Notably, CRDI remains effective even when the training set is reduced to a single image. In one-shot scenarios, it outperformed existing compatible methods like GenDA, demonstrating the robustness of the SGE guidance approach.

Discussion and Limitations

While CRDI represents a significant step forward in training-free FSIG, certain limitations remain. The model occasionally struggles with large domain gaps; for instance, reconstructing line-art sketches proved more difficult than bedrooms, likely because the model's RGB-heavy prior knowledge does not translate perfectly to sparse line art.

Furthermore, while the noise perturbation provides diversity, it is currently stochastic. Future work may involve integrating Vision-Language models like CLIP to allow for more explicit semantic control (e.g., specifying a particular expression or feature). Finally, while the method avoids the cost of fine-tuning, the iterative optimization required to find the SGE for each new domain presents an opportunity for further efficiency improvements.

Summary updated

BibTeX
@inproceedings{cao2024few,
  author = {Yu Cao and Shaogang Gong},
  title = {{Few-Shot Image Generation by Conditional Relaxing Diffusion Inversion}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72907-2\_2},
}
Figure