Spaces:
Running on Zero
Running on Zero
Fix duration callable arg order
Browse files
app.py
CHANGED
|
@@ -28,8 +28,9 @@ RESOLUTIONS = {
|
|
| 28 |
}
|
| 29 |
|
| 30 |
|
| 31 |
-
def _duration(image, instruction,
|
| 32 |
-
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
@spaces.GPU(duration=_duration)
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
|
| 31 |
+
def _duration(image, instruction, resolution, num_inference_steps, *args, **kwargs):
|
| 32 |
+
base = int(num_inference_steps) * 4 + 60
|
| 33 |
+
return base * 2 if resolution == "2K" else base
|
| 34 |
|
| 35 |
|
| 36 |
@spaces.GPU(duration=_duration)
|