Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -178,7 +178,7 @@ def preprocess_for_removal(images, masks):
|
|
178 |
arr_masks = np.stack(out_masks)
|
179 |
return torch.from_numpy(arr_images).half(), torch.from_numpy(arr_masks).half()
|
180 |
|
181 |
-
@spaces.GPU(duration=
|
182 |
def inference_and_return_video(dilation_iterations, num_inference_steps, video_state):
|
183 |
if video_state["origin_images"] is None or video_state["masks"] is None:
|
184 |
return None
|
@@ -219,7 +219,7 @@ def inference_and_return_video(dilation_iterations, num_inference_steps, video_s
|
|
219 |
clip.write_videofile(video_file, codec='libx264', audio=False, verbose=False, logger=None)
|
220 |
return video_file
|
221 |
|
222 |
-
@spaces.GPU(duration=
|
223 |
def track_video(n_frames,video_state):
|
224 |
input_points = video_state["input_points"]
|
225 |
input_labels = video_state["input_labels"]
|
|
|
178 |
arr_masks = np.stack(out_masks)
|
179 |
return torch.from_numpy(arr_images).half(), torch.from_numpy(arr_masks).half()
|
180 |
|
181 |
+
@spaces.GPU(duration=50)
|
182 |
def inference_and_return_video(dilation_iterations, num_inference_steps, video_state):
|
183 |
if video_state["origin_images"] is None or video_state["masks"] is None:
|
184 |
return None
|
|
|
219 |
clip.write_videofile(video_file, codec='libx264', audio=False, verbose=False, logger=None)
|
220 |
return video_file
|
221 |
|
222 |
+
@spaces.GPU(duration=40)
|
223 |
def track_video(n_frames,video_state):
|
224 |
input_points = video_state["input_points"]
|
225 |
input_labels = video_state["input_labels"]
|