Real-time 3D-aware Portrait Editing from a Single Image

Qingyan Bai, Yinghao Xu, Zifan Shi, Hao Ouyang, Qiuyu Wang, Ceyuan Yang, Xuan Wang, Gordon Wetzstein, Yujun Shen, Qifeng Chen · DOI

Introduction

The field of portrait editing has recently seen significant advancements, yet achieving a balance between 3D awareness, creative flexibility, and real-time performance has remained a challenge. Existing solutions typically fall into three categories: 2D diffusion models, which offer high flexibility but lack 3D consistency; 3D GANs, which provide structural integrity but are limited by rigid latent spaces; and optimization-based methods, which combine both but are too slow for practical real-time use.

To bridge this gap, we present 3DPE (3D Portrait Editing), a framework designed for high-fidelity, 3D-consistent portrait editing in real-time. By distilling the capabilities of 2D diffusion models into a lightweight 3D-aware feedforward module, 3DPE achieves an inference speed of approximately 40ms per image—a 100x speedup over previous state-of-the-art methods.

Methodology: Knowledge Distillation and Feature Disentanglement

The core of 3DPE lies in its ability to learn from a "teacher" model without inheriting its computational overhead. The framework utilizes InstructPix2Pix (IP2P), a powerful 2D editing model, to generate a vast dataset of pseudo-labels. These labels consist of paired original and edited 2D images across various styles.

Architecture and Disentanglement

3DPE builds upon the Live3D architecture, which employs a dual-branch encoder to separate low-frequency features (coarse geometry) from high-frequency features (fine texture and appearance). A key insight of this work is that freezing the geometry branch allows the model to preserve the subject's identity and head shape while the high-frequency branch is modified via cross-attention to incorporate editing instructions from text or image prompts.

Training Process

The student network is trained to mimic the 2D edits provided by IP2P while being constrained by a 3D GAN triplane representation. This constraint ensures that the resulting edits are not merely 2D overlays but are structurally integrated into the 3D volume, maintaining consistency across different viewing angles. Additionally, the model supports a "fast adaptation" mode, enabling it to learn new user-specified styles in just five minutes using a small set of image pairs.

Results and Efficiency

3DPE demonstrates superior performance in both speed and visual quality. It processes images in 0.04 seconds, making it significantly faster than optimization-based pipelines like PTI+StyleCLIP (which can take minutes) and even feedforward competitors like IP2P+Live3D.

Figure 5: Overview of 3DPE editing capabilities and efficiency comparison against existing methods.

As illustrated in the efficiency comparison, 3DPE avoids common pitfalls such as "texture crawling" or "flat" appearances. Quantitative evaluations using identity similarity metrics across novel views confirm that 3DPE maintains higher structural integrity than 2D-centric pipelines. Whether the prompt is an image (e.g., a statue or a clown) or text (e.g., "make him resemble a young child"), the edits remain consistent as the camera perspective changes.

Limitations and Future Work

While 3DPE represents a major step forward, some limitations remain. The model occasionally inherits aliasing artifacts from the underlying EG3D framework, which can manifest as flickering in fine details during camera movement. Furthermore, while fast enough for video applications, the current implementation processes frames independently, which may lead to temporal inconsistencies. Future research will focus on incorporating dedicated temporal smoothing mechanisms and improving high-resolution detail rendering.

Conclusion

3DPE successfully combines the creative power of 2D diffusion with the structural knowledge of 3D GANs. By moving from iterative optimization to a distilled feedforward approach, it enables high-quality, 3D-aware portrait editing at speeds suitable for interactive applications like AR/VR and video conferencing.

Summary updated

BibTeX
@inproceedings{bai2024real,
  author = {Qingyan Bai and Yinghao Xu and Zifan Shi and Hao Ouyang and Qiuyu Wang and Ceyuan Yang and Xuan Wang and Gordon Wetzstein and Yujun Shen and Qifeng Chen},
  title = {{Real-time 3D-aware Portrait Editing from a Single Image}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72983-6\_20},
}
Figure