Spaces:
Sleeping
Sleeping
Update stf_utils.py
Browse files- stf_utils.py +8 -2
stf_utils.py
CHANGED
@@ -74,10 +74,16 @@ class STFPipeline:
|
|
74 |
template_video_path: str = "templates/front_one_piece_dress_nodded_cut.webm",
|
75 |
config_path: str = "front_config.json",
|
76 |
checkpoint_path: str = "089.pth",
|
77 |
-
root_path: str = "works"
|
|
|
78 |
|
79 |
):
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
81 |
self.config_path = os.path.join(stf_path, config_path)
|
82 |
self.checkpoint_path = os.path.join(stf_path, checkpoint_path)
|
83 |
self.work_root_path = os.path.join(stf_path, root_path)
|
|
|
74 |
template_video_path: str = "templates/front_one_piece_dress_nodded_cut.webm",
|
75 |
config_path: str = "front_config.json",
|
76 |
checkpoint_path: str = "089.pth",
|
77 |
+
#root_path: str = "works"
|
78 |
+
root_path: str = "/tmp/works"
|
79 |
|
80 |
):
|
81 |
+
os.makedirs(root_path, exist_ok=True)
|
82 |
+
import shutil; shutil.copytree('./works', '/tmp/works')
|
83 |
+
dir_zip='/tmp/works/preprocess/nasilhong_f_v1_front/crop_video_front_one_piece_dress_nodded_cut.zip'
|
84 |
+
dir_target='/tmp/works/preprocess/nasilhong_f_v1_front/crop_video_front_one_piece_dress_nodded_cut'
|
85 |
+
import zipfile; zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
86 |
+
|
87 |
self.config_path = os.path.join(stf_path, config_path)
|
88 |
self.checkpoint_path = os.path.join(stf_path, checkpoint_path)
|
89 |
self.work_root_path = os.path.join(stf_path, root_path)
|