Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -71,8 +71,11 @@ denoiser = _build_model().to("cuda")
|
|
| 71 |
|
| 72 |
|
| 73 |
def _estimate_duration(class_name, num_steps, *args, **kwargs):
|
| 74 |
-
#
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
|
| 78 |
@spaces.GPU(duration=_estimate_duration)
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
def _estimate_duration(class_name, num_steps, *args, **kwargs):
|
| 74 |
+
# Measured on ZeroGPU (sm_120): ~4.6s of model time at 10 steps, ~8.3s at
|
| 75 |
+
# 25 steps, ~17.3s at 50 steps (Heun = 2 NFE per step, two hierarchical
|
| 76 |
+
# stages). ~0.35s/step; budget 1.5x that to absorb cold-start weight
|
| 77 |
+
# streaming and load variance, floored for the smallest runs.
|
| 78 |
+
return min(60, max(10, 2 + int(num_steps * 0.5)))
|
| 79 |
|
| 80 |
|
| 81 |
@spaces.GPU(duration=_estimate_duration)
|