Grimster commited on
Commit
ea1bea5
·
verified ·
1 Parent(s): 12487c3

Shorten GPU reservations for single-crop inference

Browse files

Reserve 30 seconds per model call instead of 90. All weights are preloaded and each call handles one bounded crop. The live pipeline ran all six models successfully on the first candidate, then unnecessarily rejected remaining short calls because the 135-second quota reservation exceeded the account balance. Keep explicit timeout/error handling and free ZeroGPU hardware unchanged.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -349,7 +349,8 @@ def load_model(kind):
349
 
350
 
351
  def gpu_call(fn):
352
- return spaces.GPU(duration=90)(fn) if DEVICE == "cuda" else fn
 
353
 
354
 
355
  @gpu_call
 
349
 
350
 
351
  def gpu_call(fn):
352
+ # One bounded crop per call; weights are preloaded. Avoid reserving 90s for short inference.
353
+ return spaces.GPU(duration=30)(fn) if DEVICE == "cuda" else fn
354
 
355
 
356
  @gpu_call