Spaces:
Sleeping
Sleeping
Update stf_utils.py
Browse files- stf_utils.py +9 -1
stf_utils.py
CHANGED
@@ -96,9 +96,13 @@ class STFPipeline:
|
|
96 |
# config_path=config_path,
|
97 |
# template_video_path=template_video_path,
|
98 |
# )
|
|
|
|
|
99 |
|
100 |
|
101 |
def execute(self, audio: str):
|
|
|
|
|
102 |
|
103 |
model = stf_alternative.create_model(
|
104 |
config_path=self.config_path,
|
@@ -107,12 +111,15 @@ class STFPipeline:
|
|
107 |
device=self.device,
|
108 |
wavlm_path="microsoft/wavlm-large",
|
109 |
)
|
|
|
|
|
110 |
self.template = stf_alternative.Template(
|
111 |
model=model,
|
112 |
config_path=self.config_path,
|
113 |
template_video_path=self.template_video_path,
|
114 |
)
|
115 |
|
|
|
116 |
|
117 |
# Path("dubbing").mkdir(exist_ok=True)
|
118 |
# save_path = os.path.join("dubbing", Path(audio).stem+"--lip.mp4")
|
@@ -139,7 +146,8 @@ class STFPipeline:
|
|
139 |
pivot = idx + 1
|
140 |
except StopIteration as e:
|
141 |
pass
|
142 |
-
|
|
|
143 |
images2video(results, save_path)
|
144 |
|
145 |
return save_path
|
|
|
96 |
# config_path=config_path,
|
97 |
# template_video_path=template_video_path,
|
98 |
# )
|
99 |
+
|
100 |
+
print('STFPipeline init')
|
101 |
|
102 |
|
103 |
def execute(self, audio: str):
|
104 |
+
|
105 |
+
print('STFPipeline execute')
|
106 |
|
107 |
model = stf_alternative.create_model(
|
108 |
config_path=self.config_path,
|
|
|
111 |
device=self.device,
|
112 |
wavlm_path="microsoft/wavlm-large",
|
113 |
)
|
114 |
+
|
115 |
+
print('STFPipeline execute 1')
|
116 |
self.template = stf_alternative.Template(
|
117 |
model=model,
|
118 |
config_path=self.config_path,
|
119 |
template_video_path=self.template_video_path,
|
120 |
)
|
121 |
|
122 |
+
print('STFPipeline execute 2')
|
123 |
|
124 |
# Path("dubbing").mkdir(exist_ok=True)
|
125 |
# save_path = os.path.join("dubbing", Path(audio).stem+"--lip.mp4")
|
|
|
146 |
pivot = idx + 1
|
147 |
except StopIteration as e:
|
148 |
pass
|
149 |
+
|
150 |
+
print('STFPipeline execute 3')
|
151 |
images2video(results, save_path)
|
152 |
|
153 |
return save_path
|