Skip to content

FaceAdapter/Face-Adapter

Repository files navigation

Face Adapter for Pre-Trained Diffusion Models with Fine-Grained ID and Attribute Control

arXiv GitHub

Introduction

Face-Adapter is an efficient and effective face editing adapter for pre-trained diffusion models, specifically targeting face reenactment and swapping tasks.

Release

  • [2024/5/25] ?? We release the gradio demo.
  • [2024/5/24] ?? We release the code and models.

Installation

# Torch >= 2.0 recommended for acceleration without xformers
pip install accelerate diffusers==0.26.0 insightface onnxruntime

Download Models

You can download models of FaceAdapter directly from here or download using python script:

# Download all files 
from huggingface_hub import snapshot_download
snapshot_download(repo_id="FaceAdapter/FaceAdapter", local_dir="./checkpoints")

# If you want to download one specific file
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="FaceAdapter/FaceAdapter", filename="controlnet/config.json", local_dir="./checkpoints")

To run the demo, you should also download the pre-trained SD models below:

? Quick Inference

SD_1.5

python infer.py 

You can adjust the cropping size with the --crop_ratio (default:0.81)parameter. But be careful not to set the crop range too large, as this can decrease the quality of the generated images due to the limit of the training data size.

?? FaceAdapter can be seamlessly plugged into community models:

python infer.py --base_model "frankjoshua/toonyou_beta6"

Disclaimer

This project strives to positively impact the domain of AI-driven image generation. Users are granted the freedom to create images using this tool, but they are expected to comply with local laws and utilize it in a responsible manner. The developers do not assume any responsibility for potential misuse by users.

Citation

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

@article{han2024face,
  title={Face Adapter for Pre-Trained Diffusion Models with Fine-Grained ID and Attribute Control},
  author={Han, Yue and Zhu, Junwei and He, Keke and Chen, Xu and Ge, Yanhao and Li, Wei and Li, Xiangtai and Zhang, Jiangning and Wang, Chengjie and Liu, Yong},
  journal={arXiv preprint arXiv:2405.12970},
  year={2024}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

主站蜘蛛池模板: 老司机67194精品线观看| 97精品在线视频| 欧美日韩视频在线成人| 国产日产卡一卡二乱码| 中文字幕在线播| 欧美黑人xxxx| 国产免费插插插| 99精品久久99久久久久| 日韩在线天堂免费观看| 免费一级毛片在级播放| 黄色成人在线网站| 很污的视频网站| 亚洲中文字幕日产乱码高清app| 色综合久久天天综合观看| 在线免费观看一级毛片| 久久人午夜亚洲精品无码区| 狠色狠色狠狠色综合久久| 国产在线视频一区二区三区| aa级黄色大片| 波少野结衣色在线| 国产做国产爱免费视频| 99久久99久久精品国产| 日日碰狠狠添天天爽爽爽| 亚洲欧美中文日韩v在线观看| 色妞妞www精品视频| 精品国产91久久久久久久a| 国产精品无码免费播放| 两夫妇交换的一天| 最近中文字幕mv在线视频www | 国产成人99久久亚洲综合精品| stoya在线观看| 日本高清二三四本2021第九页| 亚洲精品在线免费观看视频| 色综合久久中文字幕无码| 国产精品欧美一区二区三区| 三级毛片在线播放| 日韩视频一区二区三区| 亚洲爆乳无码专区www| 美女让男人捅爽| 国产成人精品999在线| 97久久精品人人做人人爽|