8000 GitHub - Thomas-wyh/FuseAnyPart: This is an official implementation for "FuseAnyPart: Diffusion-Driven Facial Parts Swapping via Multiple Reference Images"
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This is an official implementation for "FuseAnyPart: Diffusion-Driven Facial Parts Swapping via Multiple Reference Images"

Notifications You must be signed in to change notification settings

Thomas-wyh/FuseAnyPart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FuseAnyPart Overview This is an official implementation for "FuseAnyPart: Diffusion-Driven Facial Parts Swapping via Multiple Reference Images"

📣 Updates

  • Release source training and inference code.
  • Release the model weights.

🌅 Introduction

We propose FuseAnyPart, a novel diffusion-driven method for facial parts swapping. FuseAnyPart first extracts multiple decomposed features from face images with masks obtained from an open-set detection model. Then parts from different faces are aggregated in latent space with the Mask-based Fusion Module. An injection module injects this conditional information into UNet for fusing effectively. Extensive experiments validate the superiority of FuseAnyPart. FuseAnyPart Model Architecture

⚒️ Getting Started

installation

Our code is built on top of the diffusers library. To set up the environment and install the required dependencies, follow these steps:

git clone https://github.com/Thomas-wyh/FuseAnyPart.git
cd FuseAnyPart

pip install -r requirements.txt

Inference

We provide a detailed python file inference.py that demonstrates how to perform model inference. You can refer to this file to understand how to use the model and follow the inference process.

The weight file fap.bin is on HuggingFace.

Before inference, it is necessary to prepare the weights for CLIP and Realistic_Vision_V4 in advance and organize them into the pretrained_weight directory as follows:

pretrained_weight
├── fap.bin
├── image_encoder
│   ├── config.json
│   └── model.safetensors
└── Realistic_Vision_V4.0_noVAE
    ├── model_index.json
    ......

Trainning

We provide a script train.sh that automates the model training process. The training images have been pre-processed with GPEN and Grounding-DINO.

To start the training process, run the following command:

bash train.sh

📝 Results

Results

🙏🏻 Acknowledgements

We would like to thank the contributors to the Diffusers and IP-Adapter repositories, for their open research and exploration.

📒 Citation

If you find FuseAnyPart useful for your research and applications, please cite using this BibTeX:

@inproceedings{yufuseanypart,
  title={FuseAnyPart: Diffusion-Driven Facial Parts Swapping via Multiple Reference Images},
  author={Yu, Zheng and Wang, Yaohua and Cui, Siying and Zhang, Aixi and Zheng, Wei-Long and Wang, Senzhang},
  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems}
}

About

This is an official implementation for "FuseAnyPart: Diffusion-Driven Facial Parts Swapping via Multiple Reference Images"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0