add ip-adapter-faceid-plusv2
Browse files
README.md
CHANGED
|
@@ -146,10 +146,11 @@ from PIL import Image
|
|
| 146 |
|
| 147 |
from ip_adapter.ip_adapter_faceid import IPAdapterFaceIDPlus
|
| 148 |
|
|
|
|
| 149 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
| 150 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
| 151 |
image_encoder_path = "h94/IP-Adapter/models/image_encoder"
|
| 152 |
-
ip_ckpt = "ip-adapter-faceid-plus_sd15.bin"
|
| 153 |
device = "cuda"
|
| 154 |
|
| 155 |
noise_scheduler = DDIMScheduler(
|
|
@@ -179,7 +180,8 @@ prompt = "photo of a woman in red dress in a garden"
|
|
| 179 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality, blurry"
|
| 180 |
|
| 181 |
images = ip_model.generate(
|
| 182 |
-
|
|
|
|
| 183 |
)
|
| 184 |
|
| 185 |
```
|
|
|
|
| 146 |
|
| 147 |
from ip_adapter.ip_adapter_faceid import IPAdapterFaceIDPlus
|
| 148 |
|
| 149 |
+
v2 = False
|
| 150 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
| 151 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
| 152 |
image_encoder_path = "h94/IP-Adapter/models/image_encoder"
|
| 153 |
+
ip_ckpt = "ip-adapter-faceid-plus_sd15.bin" if not v2 else "ip-adapter-faceid-plusv2_sd15.bin"
|
| 154 |
device = "cuda"
|
| 155 |
|
| 156 |
noise_scheduler = DDIMScheduler(
|
|
|
|
| 180 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality, blurry"
|
| 181 |
|
| 182 |
images = ip_model.generate(
|
| 183 |
+
prompt=prompt, negative_prompt=negative_prompt, face_image=face_image, faceid_embeds=faceid_embeds, shortcut=v2, s_scale=1.0,
|
| 184 |
+
num_samples=4, width=512, height=768, num_inference_steps=30, seed=2023
|
| 185 |
)
|
| 186 |
|
| 187 |
```
|