Spaces:
Running
on
Zero
Running
on
Zero
wenmengzhou
commited on
Commit
•
9098160
1
Parent(s):
65882a7
add duration=300
Browse files
webgui.py
CHANGED
@@ -189,7 +189,7 @@ def face_detection(uploaded_img, facemask_dilation_ratio, facecrop_dilation_rati
|
|
189 |
print('face detect done.')
|
190 |
return face_img, face_mask
|
191 |
|
192 |
-
@spaces.GPU
|
193 |
def video_pipe(face_img, face_mask, uploaded_audio, width, height, length, context_frames, context_overlap, cfg, steps, sample_rate, fps, device):
|
194 |
face_mask_tensor = torch.Tensor(face_mask).to(dtype=weight_dtype, device="cuda").unsqueeze(0).unsqueeze(0).unsqueeze(0) / 255.0
|
195 |
ref_image_pil = Image.fromarray(face_img[:, :, [2, 1, 0]])
|
|
|
189 |
print('face detect done.')
|
190 |
return face_img, face_mask
|
191 |
|
192 |
+
@spaces.GPU(duration=300)
|
193 |
def video_pipe(face_img, face_mask, uploaded_audio, width, height, length, context_frames, context_overlap, cfg, steps, sample_rate, fps, device):
|
194 |
face_mask_tensor = torch.Tensor(face_mask).to(dtype=weight_dtype, device="cuda").unsqueeze(0).unsqueeze(0).unsqueeze(0) / 255.0
|
195 |
ref_image_pil = Image.fromarray(face_img[:, :, [2, 1, 0]])
|