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

    主站蜘蛛池模板: 一区二区三区观看| 精品国产一区二区麻豆| 亚洲色精品VR一区区三区| 国产凸凹视频一区二区| 久久久国产一区二区三区| 精品国产一区在线观看| 精品欧洲AV无码一区二区男男| 亚洲AV无码一区二区三区在线观看 | 国产精品 视频一区 二区三区| 亚洲Av永久无码精品一区二区 | 极品尤物一区二区三区| 日韩精品无码免费一区二区三区| 久久久不卡国产精品一区二区| 国模精品一区二区三区视频| 无码一区二区波多野结衣播放搜索 | 亚洲成人一区二区| 日本福利一区二区| 日韩美女视频一区| 精品国产一区二区三区久久狼| 韩国福利一区二区美女视频| 亚洲视频一区二区在线观看| 水蜜桃av无码一区二区| 性无码一区二区三区在线观看| 亚洲人成人一区二区三区| 三上悠亚日韩精品一区在线| 国精品无码A区一区二区| 亚洲一区二区精品视频| 成人免费一区二区三区| 国精产品一区二区三区糖心| 色婷婷AV一区二区三区浪潮| 国产免费一区二区三区不卡| 精品成人一区二区三区四区| 中文字幕一区在线| 亚洲AV成人一区二区三区AV| 日本视频一区在线观看免费| 国产情侣一区二区| 一区二区国产精品| 久久99精品国产一区二区三区| 亚洲A∨无码一区二区三区| 日韩国产免费一区二区三区| 国模大胆一区二区三区|