← 开源
Xiaojiu-z

Stable-Hair

Pytorch Implementation of: "Stable-Hair: Real-World Hair Transfer via Diffusion Model" (AAAI 2025)

ModelsVision modelsPython
在 GitHub 打开
增长势头
+124 小时新增 Star+0.2%
540
Star
62
Fork
+1
本周
1
贡献者
创建于 2024-07-16 · 更新于 2026-10-16 · 今日第 6787 名
主要开发者

Xiaojiu-z/Stable-Hair 排名第 6,787,有 540 个星标。

同类别比较

Xiaojiu-z/Stable-Hair 排名第 6,787,此处有 8 个同类条目;Mengqi-Lei/count-anything 排名第 6,785。

同类别比较
名称排名指标
Tencent-Hunyuan/Hunyuan3D-Part6,763
语言:
Python
星标数:
548
分叉数:
62
简介:
Hunyuan 3D Part Segmentation and Generation Pipeline
NVlabs/PointWorld6,770
语言:
Python
星标数:
546
分叉数:
42
简介:
PointWorld: Scaling 3D World Models for In-The-Wild Robotic Manipulation
MiniMax-AI/MiniMax-M2.16,779
星标数:
544
分叉数:
44
简介:
MiniMax M2.1, a SOTA model for real-world dev & agents.
Mengqi-Lei/count-anything6,785
语言:
Python
星标数:
540
分叉数:
45
简介:
Code and implementation guidelines for the paper ✨Counting Anything. Project Page: https://mengqi-lei.github.io/count-anything-projectpage/
pariskang/CMLM-ZhongJing6,811
语言:
Jupyter Notebook
星标数:
532
分叉数:
60
JetAstra/SDAR6,815
语言:
Python
星标数:
531
分叉数:
43
简介:
SDAR (Synergy of Diffusion and AutoRegression), a large diffusion language model(1.7B, 4B, 8B, 30B)
NVlabs/GENMO6,820
语言:
Python
星标数:
528
分叉数:
56
End2End-Diffusion/REPA-E6,827
语言:
Python
星标数:
526
分叉数:
33
简介:
[ICCV 2025] Official implementation of the paper: REPA-E: Unlocking VAE for End-to-End Tuning of Latent Diffusion Transformers
关键参数与规格
关键参数与规格
参数值
语言Python
类别Models
子类别Vision models
关键词Computer vision, Image production, Model architecture
星标数540
分叉数62
贡献者1
创建日期2024-07-16
更新日期2026-10-16
1 天星标数1
7 天星标数1
排名6,787
上次排名6,966
排名变化179
7 天星标排名11,426
上次 7 天星标排名16,110
7 天星标排名变化4,684
总星标排名18,225
上次总星标排名18,220
总星标排名变化-5
国家China
README 摘录

Official Repo for Stable-Hair **Stable-Hair: Real-World Hair Transfer via Diffusion Model** *Yuxuan Zhang, Qing Zhang, Yiren Song, Jichao Zhang, Hao Tang, Jiaming Liu* Abstract Current hair transfer methods struggle to handle diverse and intricate hairstyles, limiting their applicability in real-world scenarios. In this paper, we propose a novel diffusion-based hair transfer framework, named Stable-Hair, which robustly transfers a wide range of real-world hairstyles to user-provided faces for virtual hair try-on. To

achieve this goal, our Stable-Hair framework is designed as a two-stage pipeline. In the first stage, we train a Bald Converter alongside stable diffusion to remove hair from the user-provided face images, resulting in bald images. In the second stage, we specifically designed a Hair Extractor and a Latent IdentityNet to transfer the target hairstyle with highly detailed and high-fidelity to the bald image. The Hair Extractor is trained to encode reference images with the desired

hairstyles, while the Latent IdentityNet ensures consistency in identity and background. To minimize color deviations between source images and transfer results, we introduce a novel Latent ControlNet architecture, which functions as both the Bald Converter and Latent IdentityNet. After training on our curated triplet dataset, our method accurately transfers highly detailed and high-fidelity hairstyles to the source images. Extensive experiments demonstrate that our approach achieves state-of-the-art performance compared to existing hair transfer methods. - [x] Training code

Getting Started Environment Setup Our code is built on the diffusers version of Stable Diffusion, In our experiments, we use model version v1-5. If you have a diffusers version of controlnet configured, you can use this repository directly. Download them and save to the directory and . Inference Gradio demo We provide a simple gr demo for more flexible use. Limitation The Results are influenced by the effect of the first stage, if the bald converter does not go well

, the effect of hair transfer is not good. By the way, this released model only trained on a small dataset (6k images for stage1, 2w images for stage2) and all the face images are from FFHQ datasets which means they were cropped and aligned. From my practice, using video and full body datasets to finetune this model is a good way to improve, due to some restrictions the improved model will not be publicly available. If you want to expand

the border of this model, feel free to contact me.

常见问题

记录了多少星标和分叉?

Xiaojiu-z/Stable-Hair 有 540 个星标和 62 个分叉。

仓库排名是多少?

Xiaojiu-z/Stable-Hair 排名第 6,787。

记录的语言和类别是什么?

Xiaojiu-z/Stable-Hair 有 540 个星标,语言为 Python,类别为 Models。

哪个仓库排名最接近?

Xiaojiu-z/Stable-Hair 与 Mengqi-Lei/count-anything 比较,后者排名第 6,785,有 540 个星标。

README

Official Repo for Stable-Hair

Stable-Hair: Real-World Hair Transfer via Diffusion Model

Yuxuan Zhang, Qing Zhang, Yiren Song, Jichao Zhang, Hao Tang, Jiaming Liu

Abstract

Current hair transfer methods struggle to handle diverse and intricate hairstyles, limiting their applicability in real-world scenarios. In this paper, we propose a novel diffusion-based hair transfer framework, named Stable-Hair, which robustly transfers a wide range of real-world hairstyles to user-provided faces for virtual hair try-on. To achieve this goal, our Stable-Hair framework is designed as a two-stage pipeline. In the first stage, we train a Bald Converter alongside stable diffusion to remove hair from the user-provided face images, resulting in bald images. In the second stage, we specifically designed a Hair Extractor and a Latent IdentityNet to transfer the target hairstyle with highly detailed and high-fidelity to the bald image. The Hair Extractor is trained to encode reference images with the desired hairstyles, while the Latent IdentityNet ensures consistency in identity and background. To minimize color deviations between source images and transfer results, we introduce a novel Latent ControlNet architecture, which functions as both the Bald Converter and Latent IdentityNet. After training on our curated triplet dataset, our method accurately transfers highly detailed and high-fidelity hairstyles to the source images. Extensive experiments demonstrate that our approach achieves state-of-the-art performance compared to existing hair transfer methods.

Todo List

    • [x] Stage1 inference code
    • [x] Stage1 pre-trained weights
    • [x] Stage2 inference code
    • [x] Stage2 pre-trained weights
    • [x] Training code

Getting Started

Environment Setup

Our code is built on the diffusers version of Stable Diffusion, In our experiments, we use model version v1-5. If you have a diffusers version of controlnet configured, you can use this repository directly.

git clone https://github.com/Xiaojiu-z/Stable-Hair.git
cd Stable-Hair

Pretrained Models

Google Drive. Download them and save to the directory models/stage1 and models/stage2.

Inference

python infer_full.py

Gradio demo

We provide a simple gr demo for more flexible use.

python gradio_demo_full.py

Limitation

The Results are influenced by the effect of the first stage, if the bald converter does not go well, the effect of hair transfer is not good. By the way, this released model only trained on a small dataset (6k images for stage1, 2w images for stage2) and all the face images are from FFHQ datasets which means they were cropped and aligned. From my practice, using video and full body datasets to finetune this model is a good way to improve, due to some restrictions the improved model will not be publicly available. If you want to expand the border of this model, feel free to contact me.

Cite

@misc{zhang2024stablehairrealworldhairtransfer,
      title={Stable-Hair: Real-World Hair Transfer via Diffusion Model}, 
      author={Yuxuan Zhang and Qing Zhang and Yiren Song and Jiaming Liu},
      year={2024},
      eprint={2407.14078},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2407.14078}, 
}
排名相邻
同类项目