Spaces:
Running
on
Zero
Running
on
Zero
Update stf_utils.py
Browse files- stf_utils.py +8 -3
stf_utils.py
CHANGED
@@ -13,6 +13,9 @@ from rich.progress import track
|
|
13 |
from tqdm import tqdm
|
14 |
|
15 |
import stf_alternative
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
|
@@ -80,9 +83,8 @@ class STFPipeline:
|
|
80 |
|
81 |
):
|
82 |
#os.makedirs(root_path, exist_ok=True)
|
83 |
-
|
84 |
|
85 |
-
import zipfile
|
86 |
|
87 |
if not male:
|
88 |
dir_zip='/tmp/works/preprocess/nasilhong_f_v1_front/crop_video_front_one_piece_dress_nodded_cut.zip'
|
@@ -189,5 +191,8 @@ class STFPipeline:
|
|
189 |
pass
|
190 |
|
191 |
images2video(results, save_path)
|
|
|
|
|
|
|
192 |
|
193 |
-
return save_path
|
|
|
13 |
from tqdm import tqdm
|
14 |
|
15 |
import stf_alternative
|
16 |
+
import os.path as osp
|
17 |
+
import shutil
|
18 |
+
import zipfile
|
19 |
|
20 |
|
21 |
|
|
|
83 |
|
84 |
):
|
85 |
#os.makedirs(root_path, exist_ok=True)
|
86 |
+
shutil.copytree('/home/user/app/stf/works', '/tmp/works', dirs_exist_ok=True)
|
87 |
|
|
|
88 |
|
89 |
if not male:
|
90 |
dir_zip='/tmp/works/preprocess/nasilhong_f_v1_front/crop_video_front_one_piece_dress_nodded_cut.zip'
|
|
|
191 |
pass
|
192 |
|
193 |
images2video(results, save_path)
|
194 |
+
|
195 |
+
save_path_aud = save_path.replace('.mp4', '_aud.mp4')
|
196 |
+
merge_audio_video(save_path, audio, save_path_aud)
|
197 |
|
198 |
+
return save_path_aud #save_path
|