Abstract
Text-driven face editing—modifying attributes like hair, accessories, or facial features through natural language—is a cornerstone of AI-generated content (AIGC). However, existing methods often struggle to balance creative diversity with precise spatial control. MuseFace addresses this by introducing a novel two-stage diffusion framework that shifts the editing process from complex pixel space to a structured semantic space. By first generating a precise semantic mask from text and then using it to guide image synthesis, MuseFace achieves high-fidelity results with minimal user effort.
Introduction
The ability to edit faces using natural language prompts is a major goal in the field of image synthesis. While current models have made significant strides, they typically fall into two categories: text-only models that lack spatial grounding (often leading to artifacts in unintended areas) and mask-based models that require tedious, manual pixel-level input. MuseFace bridges this gap by automating the mask generation process through a diffusion-based approach, providing a system that is simultaneously diverse, controllable, and user-friendly.
The Challenge: Control vs. Labor
The authors identify a "critical gap" in current face editing workflows. Text-only models, such as InstructPix2Pix, frequently struggle with "spatial grounding," where the model may change parts of the face that should remain untouched. On the other hand, traditional mask-guided models offer excellent control but demand high labor costs, as users must manually draw masks for every edit. MuseFace aims to provide the precision of mask-based editing with the ease of text-based interaction.
Methodology
MuseFace solves the editing problem by splitting the task into two distinct diffusion-based stages, effectively decoupling the "where and what" (semantics) from the "how it looks" (pixels).
Stage 1: Text-to-Mask Diffusion
Instead of editing the face directly, MuseFace first edits the semantic segmentation map. This stage utilizes two primary components:
- Mask-aware Autoencoder: Designed with an auxiliary branch and skip connections, this architecture ensures that when a specific area (like hair) is edited, the remaining semantic features (eyes, nose, mouth) are perfectly preserved.
- Denoising U-Net: This diffusion model takes the original mask and a text prompt (e.g., "long hair") to generate a new, fine-grained semantic mask that reflects the requested change.
Stage 2: Semantic-aware Face Editing
Once the new semantic mask is generated, a second diffusion model performs the actual image synthesis.
- ConditionalNet: Inspired by the ControlNet architecture, this module encodes the complex features of the fine-grained semantic mask.
- High-Fidelity Synthesis: The mask acts as a spatial prior, directing the model on exactly where to change pixels and what those pixels represent. This ensures the edited region blends seamlessly with the original face while maintaining the subject's identity.
The system is flexible, operating in either Mask-free mode (where the model determines the location based on text) or Mask-guided mode (where the user provides a rough bounding box to guide the placement).
Experimental Setup and Datasets
The model was trained on a robust dataset of 30,000 real-world face images. This dataset includes:
- High-quality amodal segmentation masks.
- Over 372,000 instances across 18 semantic classes (e.g., hair, hat, eyeglasses).
- Detailed text captions generated via image-to-text models to provide rich training signals for the diffusion process.
Key Insights
- Semantic Space Efficiency: Editing a segmentation map—composed of flat color blocks—is mathematically simpler for a diffusion model than editing a high-resolution photograph. This significantly reduces the likelihood of "hallucinations" or blurry artifacts.
- Architectural Preservation: The use of skip connections in the Mask-aware Autoencoder is a critical design choice, allowing unaltered features to pass directly to the decoder and ensuring the integrity of the non-edited regions.
- Precision over Coarseness: The research demonstrates that a precise semantic mask is a far superior condition for image synthesis compared to simple bounding boxes or blurry inpainting masks, as it provides the exact shape and category of the object to be rendered.
Results and Evaluation
MuseFace was evaluated against several state-of-the-art models, including InstructPix2Pix, SD-Inpaint, and Talk-to-edit.
- Quantitative Performance: MuseFace achieved a leading ID Similarity score of 0.82 and a CLIP-Score of 25.27% in text-only tasks, indicating superior identity preservation and prompt adherence.
- Local Fidelity: In bounding-box tasks, it achieved a Local-FID of 16.64, significantly outperforming SD-Inpaint (23.03).
- Human Evaluation: In user studies, MuseFace received the highest ratings for both identity preservation (4.20/5.0) and overall quality (4.06/5.0).
Limitations and Future Work
While MuseFace excels at attribute modification, the authors noted that the Mask-aware Autoencoder’s strength in preserving pixels can sometimes make it resistant to adding entirely new objects in mask-free mode. Future work will focus on refining this "plug-and-play" capability and expanding the dataset to include more diverse, "in-the-wild" scenarios. Additionally, the framework shows promise for extension into full-body editing and video manipulation.
Summary updated