Spaces:
Runtime error
Runtime error
myniu
commited on
Commit
·
c488ebf
1
Parent(s):
421da8b
init
Browse files
app.py
CHANGED
@@ -215,7 +215,7 @@ def visualize_drag_v2(background_image_path, splited_tracks, width, height):
|
|
215 |
|
216 |
|
217 |
class Drag:
|
218 |
-
@spaces.GPU(duration=
|
219 |
def __init__(self, device, height, width, model_length):
|
220 |
self.device = device
|
221 |
|
@@ -371,7 +371,8 @@ class Drag:
|
|
371 |
outputs['flows'] = torch.from_numpy(total_nps).cuda().permute(0, 3, 1, 2).unsqueeze(0) / 255.
|
372 |
|
373 |
return outputs
|
374 |
-
|
|
|
375 |
@torch.no_grad()
|
376 |
def get_cmp_flow_from_tracking_points(self, tracking_points, motion_brush_mask, first_frame_path):
|
377 |
|
@@ -487,7 +488,7 @@ class Drag:
|
|
487 |
|
488 |
return viz_esti_flows
|
489 |
|
490 |
-
@spaces.GPU(duration=
|
491 |
def run(self, first_frame_path, tracking_points, inference_batch_size, motion_brush_mask, motion_brush_viz, ctrl_scale):
|
492 |
|
493 |
original_width, original_height = self.width, self.height
|
|
|
215 |
|
216 |
|
217 |
class Drag:
|
218 |
+
@spaces.GPU(duration=200)
|
219 |
def __init__(self, device, height, width, model_length):
|
220 |
self.device = device
|
221 |
|
|
|
371 |
outputs['flows'] = torch.from_numpy(total_nps).cuda().permute(0, 3, 1, 2).unsqueeze(0) / 255.
|
372 |
|
373 |
return outputs
|
374 |
+
|
375 |
+
@spaces.GPU
|
376 |
@torch.no_grad()
|
377 |
def get_cmp_flow_from_tracking_points(self, tracking_points, motion_brush_mask, first_frame_path):
|
378 |
|
|
|
488 |
|
489 |
return viz_esti_flows
|
490 |
|
491 |
+
@spaces.GPU(duration=200)
|
492 |
def run(self, first_frame_path, tracking_points, inference_batch_size, motion_brush_mask, motion_brush_viz, ctrl_scale):
|
493 |
|
494 |
original_width, original_height = self.width, self.height
|