weiyuchoumou526 commited on
Commit
9ec6f9f
·
1 Parent(s): cd5f616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -241,6 +241,7 @@ def sam_refine(video_state, point_prompt, click_state, interactive_state, evt:gr
241
  ("[Optional]", "Click image"), (": Try to click the image shown in step2 if you want to generate more masks.\n", None)]
242
  return painted_image, video_state, interactive_state, operation_log, operation_log
243
 
 
244
  def add_multi_mask(video_state, interactive_state, mask_dropdown):
245
  try:
246
  mask = video_state["masks"][video_state["select_frame_number"]]
@@ -340,7 +341,7 @@ def vos_tracking_video(video_state, interactive_state, mask_dropdown):
340
  #### shanggao code for mask save
341
  return video_output, video_state, interactive_state, operation_log, operation_log
342
 
343
- @spaces.GPU
344
  def inpaint_video(video_state, *_):
345
  operation_log = [("", ""), ("Inpainting finished!", "Normal")]
346
 
@@ -382,7 +383,7 @@ def inpaint_video(video_state, *_):
382
 
383
  return output_path, operation_log, operation_log
384
 
385
-
386
  # generate video after vos inference
387
  def generate_video_from_frames(frames, output_path, fps=30):
388
  """
 
241
  ("[Optional]", "Click image"), (": Try to click the image shown in step2 if you want to generate more masks.\n", None)]
242
  return painted_image, video_state, interactive_state, operation_log, operation_log
243
 
244
+ @spaces.GPU
245
  def add_multi_mask(video_state, interactive_state, mask_dropdown):
246
  try:
247
  mask = video_state["masks"][video_state["select_frame_number"]]
 
341
  #### shanggao code for mask save
342
  return video_output, video_state, interactive_state, operation_log, operation_log
343
 
344
+ @spaces.GPU(duration=180)
345
  def inpaint_video(video_state, *_):
346
  operation_log = [("", ""), ("Inpainting finished!", "Normal")]
347
 
 
383
 
384
  return output_path, operation_log, operation_log
385
 
386
+ @spaces.GPU
387
  # generate video after vos inference
388
  def generate_video_from_frames(frames, output_path, fps=30):
389
  """