Abstract
Stable-Hair is a novel diffusion-based framework designed for high-fidelity hair transfer in real-world scenarios. By employing a two-stage "bald-proxy" pipeline and a Latent ControlNet, the model overcomes the limitations of traditional GAN-based approaches, ensuring superior identity preservation and color consistency. Stable-Hair effectively handles complex hairstyles and varying poses, outperforming existing state-of-the-art methods in both quantitative metrics and user preference.
Introduction
Hair transfer—the process of transplanting a hairstyle from a reference image onto a source face—is a notoriously difficult task in computer vision. It requires a delicate balance: the model must completely alter the hair's shape, color, and texture while keeping the subject's facial identity and the background perfectly intact. Existing methods, largely based on Generative Adversarial Networks (GANs), often struggle with "in-the-wild" scenarios, failing when hairstyles are messy or when source and reference images have significantly different head poses. Stable-Hair addresses these challenges by leveraging the generative power of diffusion models.
Methodology
Stable-Hair utilizes a two-stage pipeline to decouple the tasks of hair removal and hair generation, ensuring a more stable optimization process.
The Two-Stage Pipeline
- Stage 1: Standardizing to a Bald State: The model first uses a Bald Converter to transform the source image into a "bald proxy." This provides a clean, consistent canvas for the next step, removing the interference of the original hairstyle.
- Stage 2: Hair Transfer and Integration: A Hair Extractor encodes the reference hairstyle's features (texture, flow, and color) and injects them into a diffusion U-Net via cross-attention layers. Simultaneously, a Latent IdentityNet ensures the face and background from the bald proxy remain unchanged.
Latent ControlNet
A major technical contribution is the Latent ControlNet. Standard ControlNets operate in pixel space, which often leads to color "drift" or inconsistencies. Stable-Hair moves this process into the latent space of the Variational Autoencoder (VAE). By conditioning the model within the same abstract space where the diffusion process occurs, the authors significantly improved color fidelity and structural alignment.
Automated Data Generation
Because high-quality "triplet" datasets (Source Image, Bald Image, Target Image) do not exist naturally, the authors built an automated pipeline. They used ChatGPT to generate descriptive text prompts and Stable Diffusion Inpainting to create synthetic training data. This included a "Video Strategy" that uses different frames of the same person to teach the model pose robustness, ensuring the hairstyle adapts to the head's orientation rather than appearing as a 2D overlay.
Results and Evaluation
Stable-Hair was evaluated against state-of-the-art methods like Barbershop, HairFastGAN, and Hairclip on the CelebA-HQ dataset.
Quantitative Metrics
Stable-Hair outperformed existing methods across nearly all metrics:
- Realism: Achieved a Frechet Inception Distance (FID) of 35.128, lower than all competitors.
- Identity Preservation: Scored the highest in Identity Similarity (IDS) at 0.779 and Structural Similarity (SSIM) at 0.680.
Qualitative Performance
Qualitative results demonstrate the model's ability to adapt intricate hair textures to new faces while maintaining perfect color consistency. In a user study with 30 volunteers, Stable-Hair was ranked #1 for transfer accuracy, preservation of unrelated attributes, and overall naturalness.
Conclusion and Future Work
Stable-Hair represents a significant step forward in high-fidelity hair transfer. By moving to a diffusion-based architecture and utilizing latent-space conditioning, it achieves unprecedented realism and identity preservation. While the model is currently slower than GAN-based alternatives due to the nature of diffusion, future work will explore optimization techniques like distillation. Additionally, the Latent ControlNet architecture holds promise for other image-to-image tasks where color and structural consistency are paramount.
Summary updated