myniu commited on
Commit
8b12e95
1 Parent(s): a8566a2
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
  import numpy as np
3
  import cv2
4
  import os
@@ -483,7 +484,8 @@ class Drag:
483
  viz_esti_flows = flow_to_image(controlnet_flow) # [h, w, c]
484
 
485
  return viz_esti_flows
486
-
 
487
  def run(self, first_frame_path, tracking_points, inference_batch_size, motion_brush_mask, motion_brush_viz, ctrl_scale):
488
 
489
  original_width, original_height = self.width, self.height
 
1
  import gradio as gr
2
+ import spaces
3
  import numpy as np
4
  import cv2
5
  import os
 
484
  viz_esti_flows = flow_to_image(controlnet_flow) # [h, w, c]
485
 
486
  return viz_esti_flows
487
+
488
+ @spaces.GPU(duration=500)
489
  def run(self, first_frame_path, tracking_points, inference_batch_size, motion_brush_mask, motion_brush_viz, ctrl_scale):
490
 
491
  original_width, original_height = self.width, self.height