Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -220,7 +220,7 @@ def load_model(checkpoint):
|
|
220 |
# return [sam2_checkpoint, model_cfg]
|
221 |
|
222 |
|
223 |
-
@spaces.GPU
|
224 |
def get_mask_sam_process(
|
225 |
stored_inference_state,
|
226 |
input_first_frame_image,
|
@@ -322,7 +322,7 @@ def get_mask_sam_process(
|
|
322 |
# 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)
|
323 |
return "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=False)
|
324 |
|
325 |
-
@spaces.GPU
|
326 |
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)):
|
327 |
#### PROPAGATION ####
|
328 |
sam2_checkpoint, model_cfg = load_model(checkpoint)
|
|
|
220 |
# return [sam2_checkpoint, model_cfg]
|
221 |
|
222 |
|
223 |
+
@spaces.GPU
|
224 |
def get_mask_sam_process(
|
225 |
stored_inference_state,
|
226 |
input_first_frame_image,
|
|
|
322 |
# 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)
|
323 |
return "output_first_frame.jpg", frame_names, predictor, inference_state, gr.update(choices=available_frames_to_check, value=working_frame, visible=False)
|
324 |
|
325 |
+
@spaces.GPU
|
326 |
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)):
|
327 |
#### PROPAGATION ####
|
328 |
sam2_checkpoint, model_cfg = load_model(checkpoint)
|