wenmengzhou commited on
Commit
1ba48ad
1 Parent(s): de254ad

adapte to zero gpu

Browse files
Files changed (1) hide show
  1. webgui.py +2 -1
webgui.py CHANGED
@@ -3,7 +3,7 @@
3
  '''
4
  webui
5
  '''
6
-
7
  import os
8
  import random
9
  from datetime import datetime
@@ -150,6 +150,7 @@ def select_face(det_bboxes, probs):
150
  sorted_bboxes = sorted(filtered_bboxes, key=lambda x:(x[3]-x[1]) * (x[2] - x[0]), reverse=True)
151
  return sorted_bboxes[0]
152
 
 
153
  def process_video(uploaded_img, uploaded_audio, width, height, length, seed, facemask_dilation_ratio, facecrop_dilation_ratio, context_frames, context_overlap, cfg, steps, sample_rate, fps, device):
154
 
155
  if seed is not None and seed > -1:
 
3
  '''
4
  webui
5
  '''
6
+ import spaces
7
  import os
8
  import random
9
  from datetime import datetime
 
150
  sorted_bboxes = sorted(filtered_bboxes, key=lambda x:(x[3]-x[1]) * (x[2] - x[0]), reverse=True)
151
  return sorted_bboxes[0]
152
 
153
+ @spaces.GPU
154
  def process_video(uploaded_img, uploaded_audio, width, height, length, seed, facemask_dilation_ratio, facecrop_dilation_ratio, context_frames, context_overlap, cfg, steps, sample_rate, fps, device):
155
 
156
  if seed is not None and seed > -1: