Mar2Ding commited on
Commit
4ed4483
·
verified ·
1 Parent(s): 42083b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -220,7 +220,7 @@ def load_model(checkpoint):
220
  # return [sam2_checkpoint, model_cfg]
221
 
222
 
223
-
224
  def get_mask_sam_process(
225
  stored_inference_state,
226
  input_first_frame_image,
@@ -316,7 +316,7 @@ def get_mask_sam_process(
316
  # return gr.update(visible=True), "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=True)
317
  return "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=False)
318
 
319
- @spaces.GPU(duration=180)
320
  def propagate_to_all(video_in, checkpoint, stored_inference_state, stored_frame_names, video_frames_dir, vis_frame_type, available_frames_to_check, working_frame, progress=gr.Progress(track_tqdm=True)):
321
  #### PROPAGATION ####
322
  sam2_checkpoint, model_cfg = load_model(checkpoint)
 
220
  # return [sam2_checkpoint, model_cfg]
221
 
222
 
223
+ @spaces.GPU(duration=110)
224
  def get_mask_sam_process(
225
  stored_inference_state,
226
  input_first_frame_image,
 
316
  # return gr.update(visible=True), "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=True)
317
  return "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=False)
318
 
319
+ @spaces.GPU(duration=120)
320
  def propagate_to_all(video_in, checkpoint, stored_inference_state, stored_frame_names, video_frames_dir, vis_frame_type, available_frames_to_check, working_frame, progress=gr.Progress(track_tqdm=True)):
321
  #### PROPAGATION ####
322
  sam2_checkpoint, model_cfg = load_model(checkpoint)