fbnnb commited on
Commit
9fb9e1d
·
verified ·
1 Parent(s): 2e021a7

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -1
gradio_app.py CHANGED
@@ -51,8 +51,9 @@ def extract_frames(video_path):
51
 
52
  return frame_list
53
 
54
- @spaces.GPU(duration=30)
55
  class Image2Video():
 
56
  def __init__(self,result_dir='./tmp/',gpu_num=1,resolution='256_256') -> None:
57
  self.resolution = (int(resolution.split('_')[0]), int(resolution.split('_')[1])) #hw
58
  self.download_model()
@@ -97,6 +98,7 @@ class Image2Video():
97
  print("init done.")
98
 
99
  # @spaces.GPU(duration=100)
 
100
  def get_image(self, image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, image2=None, frame_guides=None,control_scale=0.6):
101
  print("enter fn")
102
  control_frames = extract_frames(frame_guides)
 
51
 
52
  return frame_list
53
 
54
+
55
  class Image2Video():
56
+ @spaces.GPU
57
  def __init__(self,result_dir='./tmp/',gpu_num=1,resolution='256_256') -> None:
58
  self.resolution = (int(resolution.split('_')[0]), int(resolution.split('_')[1])) #hw
59
  self.download_model()
 
98
  print("init done.")
99
 
100
  # @spaces.GPU(duration=100)
101
+ @spaces.GPU
102
  def get_image(self, image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, image2=None, frame_guides=None,control_scale=0.6):
103
  print("enter fn")
104
  control_frames = extract_frames(frame_guides)