linoyts HF Staff commited on
Commit
89c4a12
·
verified ·
1 Parent(s): e7f26f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -100,12 +100,12 @@ def get_duration(image,
100
  seed,
101
  progress):
102
  """Calculate dynamic GPU duration based on parameters."""
103
- if sampling_steps > 35 and duration_seconds > 2:
104
- return 115
105
- elif sampling_steps > 35 or duration_seconds > 2:
106
  return 105
107
  else:
108
- return 80
109
 
110
  # --- 2. Gradio Inference Function ---
111
  @spaces.GPU(duration=get_duration)
 
100
  seed,
101
  progress):
102
  """Calculate dynamic GPU duration based on parameters."""
103
+ if sampling_steps > 35 and duration_seconds >= 2:
104
+ return 120
105
+ elif sampling_steps < 35 or duration_seconds < 2:
106
  return 105
107
  else:
108
+ return 90
109
 
110
  # --- 2. Gradio Inference Function ---
111
  @spaces.GPU(duration=get_duration)