Spaces:
Sleeping
Sleeping
Set the declared duration from the measured run
Browse files
app.py
CHANGED
|
@@ -97,10 +97,10 @@ def pick_point(evt: gr.SelectData):
|
|
| 97 |
|
| 98 |
|
| 99 |
def estimate_duration(image, levels, cx, cy):
|
| 100 |
-
# Checked against the visitor's remaining quota BEFORE the run, so a loose number locks
|
| 101 |
-
#
|
| 102 |
-
#
|
| 103 |
-
return int(
|
| 104 |
|
| 105 |
|
| 106 |
def _stream(image, levels, cx, cy):
|
|
|
|
| 97 |
|
| 98 |
|
| 99 |
def estimate_duration(image, levels, cx, cy):
|
| 100 |
+
# Checked against the visitor's remaining quota BEFORE the run, so a loose number locks out
|
| 101 |
+
# low-quota visitors and a tight one gets the run killed mid-way. Measured warm on ZeroGPU:
|
| 102 |
+
# 6.4s fixed, 3.2s per level. Near double that, to survive a cold worker streaming weights.
|
| 103 |
+
return int(12 + 6 * int(levels))
|
| 104 |
|
| 105 |
|
| 106 |
def _stream(image, levels, cx, cy):
|