altayavci commited on
Commit
acf52ac
1 Parent(s): e8b2b96

Update ip_adapter_openpose.py

Browse files
Files changed (1) hide show
  1. ip_adapter_openpose.py +6 -1
ip_adapter_openpose.py CHANGED
@@ -3,16 +3,21 @@ import torch
3
 
4
  from openpose import get_openpose, init as init_openpose
5
  from adapter_model import MODEL
 
6
 
7
  init_openpose()
 
 
8
  ip_model = MODEL("pose")
9
 
10
 
11
  def generate(img_human: Image, img_clothes: Image):
12
 
13
  img_openpose = get_openpose(img_human)
14
-
 
15
  img_openpose_gen = ip_model.model.generate(
 
16
  pil_image=img_clothes,
17
  image=img_openpose,
18
  width=512,
 
3
 
4
  from openpose import get_openpose, init as init_openpose
5
  from adapter_model import MODEL
6
+ from img2txt import derive_caption,init as init_img2txt
7
 
8
  init_openpose()
9
+ init_img2txt()
10
+
11
  ip_model = MODEL("pose")
12
 
13
 
14
  def generate(img_human: Image, img_clothes: Image):
15
 
16
  img_openpose = get_openpose(img_human)
17
+ prompt = derive_caption(img_clothes)
18
+
19
  img_openpose_gen = ip_model.model.generate(
20
+ prompt=prompt,
21
  pil_image=img_clothes,
22
  image=img_openpose,
23
  width=512,