Spaces:
Configuration error
Configuration error
Update ip_adapter_openpose.py
Browse files- ip_adapter_openpose.py +5 -8
ip_adapter_openpose.py
CHANGED
@@ -8,20 +8,17 @@ init_openpose()
|
|
8 |
ip_model = MODEL("pose")
|
9 |
|
10 |
|
11 |
-
def generate(img_human: Image, img_clothes: Image
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
img_human = img_human.resize((width, height))
|
17 |
-
img_clothes = img_clothes.resize((width, height))
|
18 |
img_openpose = get_openpose(img_human)
|
19 |
|
20 |
img_openpose_gen = ip_model.model.generate(
|
21 |
pil_image=img_clothes,
|
22 |
image=img_openpose,
|
23 |
-
width=
|
24 |
-
height=
|
25 |
num_samples=1,
|
26 |
num_inference_steps=30,
|
27 |
seed=42
|
|
|
8 |
ip_model = MODEL("pose")
|
9 |
|
10 |
|
11 |
+
def generate(img_human: Image, img_clothes: Image):
|
12 |
|
13 |
+
img_human = img_human.resize((512, 512))
|
14 |
+
img_clothes = img_clothes.resize((512, 768))
|
|
|
|
|
|
|
15 |
img_openpose = get_openpose(img_human)
|
16 |
|
17 |
img_openpose_gen = ip_model.model.generate(
|
18 |
pil_image=img_clothes,
|
19 |
image=img_openpose,
|
20 |
+
width=512,
|
21 |
+
height=768,
|
22 |
num_samples=1,
|
23 |
num_inference_steps=30,
|
24 |
seed=42
|