dipta007 commited on
Commit
af95dfe
·
verified ·
1 Parent(s): f0e9947

Set the declared duration from the measured run

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # out low-quota visitors, and a tight one gets the run killed mid-way. Provisional until
102
- # measured on the real hardware.
103
- return int(15 + 9 * int(levels))
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):