Spaces:
Configuration error
Configuration error
Update ip_adapter_inpainting.py
Browse files- ip_adapter_inpainting.py +4 -4
ip_adapter_inpainting.py
CHANGED
@@ -8,7 +8,7 @@ from img2txt import derive_caption, init as init_img2txt
|
|
8 |
from utils import alpha_composite_manuel
|
9 |
from adapter_model import MODEL
|
10 |
|
11 |
-
init_face_seg()
|
12 |
init_body_seg()
|
13 |
init_img2txt()
|
14 |
|
@@ -43,9 +43,9 @@ def generate(img_openpose_gen: Image, img_human: Image, img_clothes: Image, segm
|
|
43 |
scale=0.8
|
44 |
)[0]
|
45 |
|
46 |
-
cropped_head = get_cropped(img_human.resize(img_openpose_gen.size), 13, False, True)
|
47 |
-
ip_gen_final = Image.alpha_composite(ip_gen.convert("RGBA"),
|
48 |
cropped_head.convert("RGBA")
|
49 |
)
|
50 |
torch.cuda.empty_cache()
|
51 |
-
return
|
|
|
8 |
from utils import alpha_composite_manuel
|
9 |
from adapter_model import MODEL
|
10 |
|
11 |
+
#init_face_seg()
|
12 |
init_body_seg()
|
13 |
init_img2txt()
|
14 |
|
|
|
43 |
scale=0.8
|
44 |
)[0]
|
45 |
|
46 |
+
#cropped_head = get_cropped(img_human.resize(img_openpose_gen.size), 13, False, True)
|
47 |
+
#ip_gen_final = Image.alpha_composite(ip_gen.convert("RGBA"),
|
48 |
cropped_head.convert("RGBA")
|
49 |
)
|
50 |
torch.cuda.empty_cache()
|
51 |
+
return ip_gen
|