Diffusion-driven GAN Inversion for Multi-Modal Face Image Generation

Jihyun Kim, Changjae Oh, Hoseok Do, Soohyun Kim, Kwanghoon SohnCVPR 2024

Abstract

We present a new multimodal face image generation method that converts a text prompt and a visual input, such as a semantic mask or scribble map, into a photorealistic face image. By combining the strengths of Generative Adversarial Networks (GANs) and Diffusion Models (DMs), we employ multimodal features from the DM into the latent space of pretrained GANs. Our approach uses a mapping network and a style modulation network to convert representations in feature and attention maps into latent codes. This allows for the generation of 2D or 3D-aware facial images that align with textual and structural inputs. Our results outperform existing methods in realism and multi-view consistency.

Introduction

Generating high-fidelity face images from a combination of textual descriptions (e.g., "blonde hair") and structural guides (e.g., semantic masks) is a significant challenge in computer vision. While Diffusion Models (DMs) offer flexibility and stability, Generative Adversarial Networks (GANs) excel at high-resolution, editable latent spaces. However, effectively inverting complex multi-modal conditions into a GAN's latent space often results in poor alignment. This paper addresses the multi-modal alignment gap, proposing a framework that leverages a Diffusion Model as a feature-rich encoder to guide GAN inversion for 2D and 3D-aware face synthesis.

Methodology

The proposed framework utilizes a pre-trained ControlNet (a diffusion model) as an encoder to extract internal features for guiding a GAN, such as StyleGAN or EG3D.

Mapping and Modulation

A Mapping Network ($\\mathcal{M}$) converts semantic features from the DM's U-Net middle block into a base latent code ($w^m$). To refine this, an Attention-based Style Modulation Network (AbSMNet, $\\mathcal{T}$) extracts cross-attention maps that link text tokens to spatial regions. This network produces scale and shift parameters to adjust the GAN's latent code, ensuring that fine details specified in the text are accurately localized in the generated image.

Multi-Step Training

The authors employ a multi-step training strategy that accounts for the temporal evolution of features in the diffusion process. Early denoising steps are used to capture text-relevant features, while later steps focus on structural details, ensuring the final GAN output respects both modalities.

Results and Discussion

The method was evaluated using the CelebAMask-HQ dataset. Quantitative results show a significant improvement in 3D-aware generation, with a 32.76% increase in mIoU compared to previous state-of-the-art methods like IDE-3D.

Multi-modal generation results showing a semantic mask transformed into various styles like 'Greek statue' and 'Cartoon style' based on text prompts.

Qualitatively, the model demonstrates exceptional control. It can generate faces that strictly follow complex prompts while adhering to provided semantic masks. For instance, attributes like eyeglasses are rendered with high fidelity while maintaining the overall facial structure defined by the mask.

High-fidelity face generation following specific textual attributes like eyeglasses.

Furthermore, the integration with 3D-aware GANs like EG3D allows for perfect multi-view consistency, a feature often lacking in standard 2D diffusion models.

Conclusion

This research demonstrates that the internal states of Diffusion Models can serve as powerful universal encoders for GAN inversion. By bridging these two architectures, the method achieves superior multi-modal alignment and 3D consistency. Future work will focus on expanding the style domain beyond the pre-trained GAN's training data and improving pose-latent mapping for more extreme head orientations.

Summary updated

BibTeX
@inproceedings{kim2024diffusion,
  author = {Jihyun Kim and Changjae Oh and Hoseok Do and Soohyun Kim and Kwanghoon Sohn},
  title = {{Diffusion-driven GAN Inversion for Multi-Modal Face Image Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=E25dH6v9yo},
}
Figure