yonishafir
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -96,24 +96,8 @@ accelerate==0.33.0
|
|
96 |
huggingface-hub==0.27.1
|
97 |
```
|
98 |
|
99 |
-
|
100 |
```python
|
101 |
-
import cv2
|
102 |
-
import torch
|
103 |
-
import numpy as np
|
104 |
-
from PIL import Image
|
105 |
-
|
106 |
-
from transformers import CLIPVisionModelWithProjection
|
107 |
-
from diffusers.models import ControlNetModel
|
108 |
-
|
109 |
-
from huggingface_hub import snapshot_download, hf_hub_download
|
110 |
-
|
111 |
-
from insightface.app import FaceAnalysis
|
112 |
-
|
113 |
-
from pipeline_bria_id_preservation import BriaIDPreservationDiffusionPipeline, draw_kps
|
114 |
-
|
115 |
-
|
116 |
-
# ================= Prepare and download models and checkpoints =================
|
117 |
# Download face encoder
|
118 |
snapshot_download("fal/AuraFace-v1", local_dir="./models/auraface")
|
119 |
|
@@ -129,6 +113,22 @@ hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="pipeline_br
|
|
129 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/attention_processor.py", local_dir="./ip_adapter")
|
130 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/resampler.py", local_dir="./ip_adapter")
|
131 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/utils.py", local_dir="./ip_adapter")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
|
134 |
# Util functions
|
@@ -170,7 +170,7 @@ def make_canny_condition(image, min_val=100, max_val=200, w_bilateral=True):
|
|
170 |
|
171 |
|
172 |
# ================= Parameters =================
|
173 |
-
default_negative_prompt = "
|
174 |
|
175 |
resolution = 1024
|
176 |
seed = 12345
|
|
|
96 |
huggingface-hub==0.27.1
|
97 |
```
|
98 |
|
99 |
+
#### download needed files
|
100 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
# Download face encoder
|
102 |
snapshot_download("fal/AuraFace-v1", local_dir="./models/auraface")
|
103 |
|
|
|
113 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/attention_processor.py", local_dir="./ip_adapter")
|
114 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/resampler.py", local_dir="./ip_adapter")
|
115 |
hf_hub_download(repo_id="briaai/BRIA-2.3-ID_Preservation", filename="ip_adapter/utils.py", local_dir="./ip_adapter")
|
116 |
+
```
|
117 |
+
|
118 |
+
```python
|
119 |
+
import cv2
|
120 |
+
import torch
|
121 |
+
import numpy as np
|
122 |
+
from PIL import Image
|
123 |
+
|
124 |
+
from transformers import CLIPVisionModelWithProjection
|
125 |
+
from diffusers.models import ControlNetModel
|
126 |
+
|
127 |
+
from huggingface_hub import snapshot_download, hf_hub_download
|
128 |
+
|
129 |
+
from insightface.app import FaceAnalysis
|
130 |
+
|
131 |
+
from pipeline_bria_id_preservation import BriaIDPreservationDiffusionPipeline, draw_kps
|
132 |
|
133 |
|
134 |
# Util functions
|
|
|
170 |
|
171 |
|
172 |
# ================= Parameters =================
|
173 |
+
default_negative_prompt = "Text,Ugly,Morbid,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
|
174 |
|
175 |
resolution = 1024
|
176 |
seed = 12345
|