linoyts HF Staff commited on
Commit
608a3d4
·
verified ·
1 Parent(s): 600d72c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -91,11 +91,11 @@ def handle_image_upload(image):
91
  def get_duration(image, prompt, size, duration_seconds, sampling_steps, guide_scale, shift, seed):
92
  """Calculate dynamic GPU duration based on parameters."""
93
  if sampling_steps > 35 and duration_seconds > 2:
94
- return 90
95
  elif sampling_steps > 35 or duration_seconds > 2:
96
- return 80
97
  else:
98
- return 60
99
 
100
  # --- 2. Gradio Inference Function ---
101
  @spaces.GPU(duration=get_duration)
 
91
  def get_duration(image, prompt, size, duration_seconds, sampling_steps, guide_scale, shift, seed):
92
  """Calculate dynamic GPU duration based on parameters."""
93
  if sampling_steps > 35 and duration_seconds > 2:
94
+ return 95
95
  elif sampling_steps > 35 or duration_seconds > 2:
96
+ return 85
97
  else:
98
+ return 70
99
 
100
  # --- 2. Gradio Inference Function ---
101
  @spaces.GPU(duration=get_duration)