Abstract
Editing real facial images is a crucial task in computer vision with significant demand in various real-world applications. While GAN-based methods have showed potential in manipulating images especially when combined with CLIP, these methods are limited in their ability to reconstruct real images due to challenging GAN inversion capability. Despite the successful image reconstruction achieved by diffusion-based methods, there are still challenges in effectively manipulating fine-gained facial attributes with textual instructions. To address these issues and facilitate convenient manipulation of real facial images, we propose a novel approach that conduct text-driven image editing in the semantic latent space of diffusion model. By aligning the temporal feature of the diffusion model with the semantic condition at generative process, we introduce a stable manipulation strategy, which perform precise zero-shot manipulation effectively. Furthermore, we develop an interactive system named ChatFace, which combines the zero-shot reasoning ability of large language models to perform efficient manipulations in diffusion semantic latent space. This system enables users to perform complex multi-attribute manipulations through dialogue, opening up new possibilities for interactive image editing. Extensive experiments confirmed that our approach outperforms previous methods and enables precise editing of real facial images, making it a promising candidate for real-world applications.
Introduction
The task of editing real-world facial images requires a delicate balance between high-fidelity reconstruction—ensuring the subject's identity remains intact—and precise manipulation of specific attributes. Traditional GAN-based approaches, such as StyleCLIP, often struggle with the "inversion" problem, where mapping a real photo into the latent space leads to identity loss or background artifacts. Conversely, while diffusion models excel at reconstruction, they lack fine-grained semantic control, often resulting in "unstable" edits where unintended features are altered alongside the target attribute.
ChatFace introduces a novel interactive system that bridges this gap by combining the reasoning power of Large Language Models (LLMs) with the high-fidelity generation of diffusion models. By manipulating the semantic latent space and employing a specialized "Stable Manipulation Strategy," it achieves precise, fine-grained attribute control while maintaining near-perfect identity preservation.
Methodology
ChatFace addresses these challenges through a multi-stage pipeline centered on the Diffusion Autoencoder (DAE) architecture.
Diffusion Latent Space Manipulation
The system utilizes a DAE to decompose an image into two components: a high-level semantic latent code ($z$) and a low-level noise latent code ($x_T$). This separation allows for high-fidelity reconstruction. To enable editing, a lightweight 4-layer Residual Mapping Network is trained to identify "editing directions" within the $z$ space. Given an input $z$, the network predicts a displacement vector ($\Delta z$) corresponding to a specific text prompt.
Stable Manipulation Strategy (SMS)
A core technical innovation of ChatFace is the Stable Manipulation Strategy. Diffusion models generate images hierarchically, with coarse structures appearing in early steps and fine textures in later ones. SMS aligns the semantic condition with this temporal process by applying the edited code ($z_{edit}$) during early denoising steps and gradually transitioning back to the original code ($z$) in later steps. This prevents the "washing out" of original image details and ensures that edits like hair color changes do not unintentionally alter facial geometry or background elements.
LLM-Guided Interaction
ChatFace leverages the zero-shot reasoning capabilities of LLMs (e.g., ChatGPT) to parse natural language queries. The LLM identifies target attributes, assigns numerical "strength" values, and determines the necessary diffusion steps, allowing users to perform complex multi-attribute manipulations through simple dialogue.
Experiments and Results
The researchers evaluated ChatFace using the CelebA-HQ and FFHQ datasets, as well as "in-the-wild" images collected from the internet.
Quantitative Performance
ChatFace outperformed state-of-the-art methods across key metrics. On the CelebA-HQ dataset, it achieved an Identity Similarity (ID) score of 0.84, significantly higher than StyleCLIP (0.35) and DiffusionCLIP (0.76). This indicates superior preservation of the subject's unique features during the editing process.
Qualitative Comparison
Visual results demonstrate that ChatFace can modify attributes like hair color, facial hair, or expressions without affecting the background or the subject's clothing—common failure points for GAN-based inversion and standard diffusion editing.
In human evaluations, ChatFace was preferred by over 90% of participants for attributes like "Smile" and "Glasses," highlighting its effectiveness in producing realistic and accurate edits.
Discussion and Conclusion
ChatFace represents a significant advancement in interactive image editing. By leveraging the temporal hierarchy of diffusion models and the reasoning power of LLMs, it provides a user-friendly interface for precise, high-fidelity face manipulation.
While currently limited to the domain of human faces due to the underlying pre-trained DAE, the principles of the Stable Manipulation Strategy and the LLM-guided latent space manipulation offer a promising framework for general object editing. Future work will focus on expanding the system's generalization capabilities to handle more diverse datasets and complex scenes.
Summary updated