hpoghos commited on
Commit
8cf7862
·
1 Parent(s): 4f9d2b5

add spaces.GPU durations

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -56,7 +56,7 @@ msxl_model = init_v2v_model(cfg_v2v)
56
  # -------------------------
57
  # ----- Functionality -----
58
  # -------------------------
59
- @spaces.GPU
60
  def generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance, where_to_log=result_fol):
61
  now = datetime.datetime.now()
62
  name = prompt[:100].replace(" ", "_") + "_" + str(now.time()).replace(":", "_").replace(".", "_")
@@ -86,6 +86,7 @@ def generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, se
86
  video_path = opj(where_to_log, name+".mp4")
87
  return video_path
88
 
 
89
  def enhance(prompt, input_to_enhance, num_frames=None, image=None, model_name_stage1=None, model_name_stage2=None, seed=33, t=50, image_guidance=9.5, result_fol=result_fol):
90
  if input_to_enhance is None:
91
  input_to_enhance = generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance)
 
56
  # -------------------------
57
  # ----- Functionality -----
58
  # -------------------------
59
+ @spaces.GPU(duration=420)
60
  def generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance, where_to_log=result_fol):
61
  now = datetime.datetime.now()
62
  name = prompt[:100].replace(" ", "_") + "_" + str(now.time()).replace(":", "_").replace(".", "_")
 
86
  video_path = opj(where_to_log, name+".mp4")
87
  return video_path
88
 
89
+ @spaces.GPU(duration=360)
90
  def enhance(prompt, input_to_enhance, num_frames=None, image=None, model_name_stage1=None, model_name_stage2=None, seed=33, t=50, image_guidance=9.5, result_fol=result_fol):
91
  if input_to_enhance is None:
92
  input_to_enhance = generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance)