Spaces:
Running
on
T4
Running
on
T4
PKUWilliamYang
commited on
Commit
•
87e6952
1
Parent(s):
f343e83
Update vtoonify_model.py
Browse files- vtoonify_model.py +2 -2
vtoonify_model.py
CHANGED
@@ -206,7 +206,7 @@ class Model():
|
|
206 |
if instyle is None or aligned_face is None:
|
207 |
return np.zeros((256,256,3), np.uint8), 'Opps, something wrong with the input. Please go to Step 2 and Rescale Image/First Frame again.'
|
208 |
if self.style_name != style_type:
|
209 |
-
exstyle = self.load_model(style_type)
|
210 |
if exstyle is None:
|
211 |
return np.zeros((256,256,3), np.uint8), 'Opps, something wrong with the style type. Please go to Step 1 and load model again.'
|
212 |
with torch.no_grad():
|
@@ -234,7 +234,7 @@ class Model():
|
|
234 |
video_cap.release()
|
235 |
return 'default.mp4', 'Opps, something wrong with the input. Please go to Step 2 and Rescale Video again.'
|
236 |
if self.style_name != style_type:
|
237 |
-
exstyle = self.load_model(style_type)
|
238 |
if exstyle is None:
|
239 |
return 'default.mp4', 'Opps, something wrong with the style type. Please go to Step 1 and load model again.'
|
240 |
num = min(self.video_limit_gpu, int(video_cap.get(7)))
|
|
|
206 |
if instyle is None or aligned_face is None:
|
207 |
return np.zeros((256,256,3), np.uint8), 'Opps, something wrong with the input. Please go to Step 2 and Rescale Image/First Frame again.'
|
208 |
if self.style_name != style_type:
|
209 |
+
exstyle, _ = self.load_model(style_type)
|
210 |
if exstyle is None:
|
211 |
return np.zeros((256,256,3), np.uint8), 'Opps, something wrong with the style type. Please go to Step 1 and load model again.'
|
212 |
with torch.no_grad():
|
|
|
234 |
video_cap.release()
|
235 |
return 'default.mp4', 'Opps, something wrong with the input. Please go to Step 2 and Rescale Video again.'
|
236 |
if self.style_name != style_type:
|
237 |
+
exstyle, _ = self.load_model(style_type)
|
238 |
if exstyle is None:
|
239 |
return 'default.mp4', 'Opps, something wrong with the style type. Please go to Step 1 and load model again.'
|
240 |
num = min(self.video_limit_gpu, int(video_cap.get(7)))
|