Spaces:
Running
on
A10G
Running
on
A10G
汐知
commited on
Commit
•
6bf2cc3
1
Parent(s):
b39d5a5
update
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
import sys
|
3 |
-
sys.path.append('.')
|
4 |
import cv2
|
5 |
import einops
|
6 |
import numpy as np
|
@@ -19,7 +19,7 @@ from huggingface_hub import snapshot_download
|
|
19 |
|
20 |
|
21 |
snapshot_download(repo_id="xichenhku/AnyDoor_models", local_dir="./AnyDoor_models")
|
22 |
-
|
23 |
|
24 |
cv2.setNumThreads(0)
|
25 |
cv2.ocl.setUseOpenCL(False)
|
@@ -43,7 +43,7 @@ ddim_sampler = DDIMSampler(model)
|
|
43 |
|
44 |
if use_interactive_seg:
|
45 |
from iseg.coarse_mask_refine_util import BaselineModel
|
46 |
-
model_path = './
|
47 |
iseg_model = BaselineModel().eval()
|
48 |
weights = torch.load(model_path , map_location='cpu')['state_dict']
|
49 |
iseg_model.load_state_dict(weights, strict= True)
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
+
#sys.path.append('.')
|
4 |
import cv2
|
5 |
import einops
|
6 |
import numpy as np
|
|
|
19 |
|
20 |
|
21 |
snapshot_download(repo_id="xichenhku/AnyDoor_models", local_dir="./AnyDoor_models")
|
22 |
+
snapshot_download(repo_id="xichenhku/mask_refine", local_dir="./mask_refine")
|
23 |
|
24 |
cv2.setNumThreads(0)
|
25 |
cv2.ocl.setUseOpenCL(False)
|
|
|
43 |
|
44 |
if use_interactive_seg:
|
45 |
from iseg.coarse_mask_refine_util import BaselineModel
|
46 |
+
model_path = './mask_refine/coarse_mask_refine.pth'
|
47 |
iseg_model = BaselineModel().eval()
|
48 |
weights = torch.load(model_path , map_location='cpu')['state_dict']
|
49 |
iseg_model.load_state_dict(weights, strict= True)
|