Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -101,11 +101,11 @@ def get_duration(image,
|
|
101 |
progress):
|
102 |
"""Calculate dynamic GPU duration based on parameters."""
|
103 |
if sampling_steps > 35 and duration_seconds > 2:
|
104 |
-
return
|
105 |
elif sampling_steps > 35 or duration_seconds > 2:
|
106 |
-
return
|
107 |
else:
|
108 |
-
return
|
109 |
|
110 |
# --- 2. Gradio Inference Function ---
|
111 |
@spaces.GPU(duration=get_duration)
|
|
|
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)
|