nxsEdson commited on
Commit
13d4f59
1 Parent(s): 79c7bec

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -3
README.md CHANGED
@@ -1,3 +1,84 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - Kolors
7
+ - text-to-image
8
+ - stable-diffusion
9
+ library_name: diffusers
10
+ ---
11
+
12
+ # Kolors-IP-Adapter-FaceID-Plus weights and inference code
13
+
14
+ <div align="center" style="display: flex; justify-content: center; flex-wrap: wrap;">
15
+ <a href="https://github.com/Kwai-Kolors/Kolors"><img src="https://img.shields.io/static/v1?label=Kolors Code&message=Github&color=blue&logo=github-pages"></a> &ensp;
16
+ <a href="https://kwai-kolors.github.io/"><img src="https://img.shields.io/static/v1?label=Team%20Page&message=Page&color=green"></a> &ensp;
17
+ <a href="https://github.com/Kwai-Kolors/Kolors/blob/master/imgs/Kolors_paper.pdf"><img src="https://img.shields.io/static/v1?label=Tech Report&message=Arxiv:Kolors&color=red&logo=arxiv"></a> &ensp;
18
+ <a href="https://kolors.kuaishou.com/"><img src="https://img.shields.io/static/v1?label=Official Website&message=Page&color=green"></a>
19
+ </div>
20
+
21
+ ## <a name="Introduction"></a>📖 Introduction
22
+
23
+ We provide Kolors-IP-Adapter-FaceID-Plus module weights and inference code based on [Kolors-Basemodel](https://huggingface.co/Kwai-Kolors/Kolors). Examples of Kolors-IP-Adapter-FaceID-Plus results are as follows:
24
+ <img src="demo.png">
25
+
26
+ - Our Kolors-IP-Adapter-FaceID-Plus module is trained on a large-scale and high-quality face dataset. We use the face ID embeddings generated by [insightface](https://github.com/deepinsight/insightface) and the CLIP features of face area to keep the face ID and structure information.
27
+
28
+ ## <a name="Evaluation"></a>📊 Evaluation
29
+ For evaluation, we constructed a test set consisting of over 200 reference images and text prompts. We invited several image experts to provide fair ratings for the generated results of different models. The experts assessed the generated images based on five criteria: visual appeal, text faithfulness, face similarity, facial aesthetics and overall satisfaction. Visual appeal and text faithfulness are used to measure the text-to-image generation capability, adhering to the evaluation standards of BaseModel. Meanwhile, face similarity and facial aesthetics are used to evaluate the performance of the proposed Kolors-IP-Adapter-FaceID-Plus. The results are summarized in the table below, where Kolors-IP-Adapter-FaceID-Plus outperforms SDXL-IP-Adapter-FaceID-Plus across all metrics.
30
+
31
+
32
+ | Model | Average Text Faithfulness | Average Visual Appeal | Average Face Similarity | Average Facial Aesthetics | Average Overall Satisfaction |
33
+ | :--------------: | :--------: | :--------: | :--------: | :--------: | :--------: |
34
+ | SDXL-IP-Adapter-FaceID-Plus | 4.014 | 3.455 | 3.05 | 2.584 | 2.448 |
35
+ | **Kolors-IP-Adapter-FaceID-Plus** | **4.235** | **4.374** | **4.415** | **3.887** | **3.561** |
36
+ ------
37
+
38
+ <img src="comparison.png">
39
+
40
+ <font color=gray style="font-size:12px"> *Kolors-IP-Adapter-FaceID-Plus employs chinese prompts, while SDXL-IP-Adapter-FaceID-Plus use english prompts.*</font>
41
+
42
+
43
+ ## <a name="Usage"></a>🛠️ Usage
44
+
45
+ ### Requirements
46
+
47
+ The dependencies and installation are basically the same as the [Kolors-BaseModel](https://huggingface.co/Kwai-Kolors/Kolors).
48
+
49
+ <br>
50
+
51
+ 1. Repository Cloning and Dependency Installation
52
+
53
+ ```bash
54
+ apt-get install git-lfs
55
+ git clone https://github.com/Kwai-Kolors/Kolors
56
+ cd Kolors
57
+ conda create --name kolors python=3.8
58
+ conda activate kolors
59
+ pip install -r requirements.txt
60
+ pip install insightface onnxruntime-gpu
61
+ python3 setup.py install
62
+ ```
63
+
64
+ 2. Weights download [link](https://huggingface.co/Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus):
65
+ ```bash
66
+ huggingface-cli download --resume-download Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus --local-dir weights/Kolors-IP-Adapter-FaceID-Plus
67
+ ```
68
+ or
69
+ ```bash
70
+ git lfs clone https://huggingface.co/Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus weights/Kolors-IP-Adapter-FaceID-Plus
71
+ ```
72
+
73
+ 3. Inference:
74
+ ```bash
75
+ python ipadapter_FaceID/sample_ipadapter_faceid_plus.py ./ipadapter_FaceID/assets/image1.png "穿着晚礼服,在星光下的晚宴场景中,烛光闪闪,整个场景洋溢着浪漫而奢华的氛围"
76
+
77
+ python ipadapter_FaceID/sample_ipadapter_faceid_plus.py ./ipadapter_FaceID/assets/image2.png "西部牛仔,牛仔帽,荒野大镖客,背景是西部小镇,仙人掌,,日落余晖, 暖色调, 使用XT4胶片拍摄, 噪点, 晕影, 柯达胶卷,复古"
78
+
79
+ ```
80
+
81
+ ### Acknowledgments
82
+ - Thanks to [insightface](https://github.com/deepinsight/insightface) for the face representations.
83
+ - Thanks to [IP-Adapter](https://github.com/tencent-ailab/IP-Adapter) for the codebase.
84
+ <br>