harp-dev Claude Opus 5.5 commited on
Commit
610db00
·
verified ·
1 Parent(s): c0f047b

Size the reservation from current timings

Browse files

The estimate was measured when the model was built inside every call. It is built when the worker starts now, and a call measures about 2 to 8 s for 30 s of piano and 10 to 15 s for 300 s, so the reservation is 8 s plus 0.05 s per second of audio, down from 10 s plus 0.1 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -67,8 +67,9 @@ MAX_GPU_SECONDS = 900
67
 
68
 
69
  def gpu_seconds(input_file):
70
- # Measured at about 15 s for 300 s of piano, building the model included, padded
71
- return 10 + 0.1 * sf.info(input_file).duration
 
72
 
73
 
74
  @spaces.GPU(duration=gpu_seconds)
 
67
 
68
 
69
  def gpu_seconds(input_file):
70
+ # Measured at about 2 to 8 s for 30 s of piano and 10 to 15 s for 300 s, upload included,
71
+ # padded. The model is built when the worker starts, not inside the call.
72
+ return 8 + 0.05 * sf.info(input_file).duration
73
 
74
 
75
  @spaces.GPU(duration=gpu_seconds)