altayavci commited on
Commit
1fef0be
1 Parent(s): 7415c56

Update ip_adapter_openpose.py

Browse files
Files changed (1) hide show
  1. 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, scale: int=2): # 512 768'e ayarlanabilir
12
 
13
- width = int(img_human.size[0] / scale)
14
- height = int(img_human.size[1] / scale)
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=width,
24
- height=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