Spaces:
Sleeping
Sleeping
Shorten GPU reservations for single-crop inference
Browse filesReserve 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.
348 unmodified lines349350351352353354355348 unmodified linesdef gpu_call(fn):return spaces.GPU(duration=90)(fn) if DEVICE == "cuda" else fn@gpu_call348 unmodified lines349350351352353354355356348 unmodified linesdef gpu_call(fn):# One bounded crop per call; weights are preloaded. Avoid reserving 90s for short inference.return spaces.GPU(duration=30)(fn) if DEVICE == "cuda" else fn@gpu_call
app.py+2-1