Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
104 |
-
return
|
105 |
-
elif sampling_steps
|
106 |
return 105
|
107 |
else:
|
108 |
-
return
|
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)
|