Zrelv Claude Opus 4.8 (1M context) commited on
Commit
3883844
·
1 Parent(s): d0326d0

Raise GPU duration cap 140 -> 145 (~290s reported, still under 300 cap)

Browse files

Gives each generation ~10s more runtime before the reservation kills it,
reducing mid-render kills on slow cold-start gens, while 145x2=290 stays under
the free-tier ~300s per-call limit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M4Dr1cMq3pUbTUnXXRs9V1

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -375,9 +375,9 @@ def get_inference_duration(
375
 
376
  # Cap reserved GPU duration so the reported reservation stays under free-tier
377
  # ZeroGPU's ~300s per-call limit — the padded worst-case was tripping
378
- # "requested GPU duration larger than the maximum allowed". 140 still covers
379
  # real p90 (~107s) and the 150s caller timeout.
380
- return min(15 + gen_time, 140)
381
 
382
 
383
  @spaces.GPU(duration=get_inference_duration)
 
375
 
376
  # Cap reserved GPU duration so the reported reservation stays under free-tier
377
  # ZeroGPU's ~300s per-call limit — the padded worst-case was tripping
378
+ # "requested GPU duration larger than the maximum allowed". 145 still covers
379
  # real p90 (~107s) and the 150s caller timeout.
380
+ return min(15 + gen_time, 145)
381
 
382
 
383
  @spaces.GPU(duration=get_inference_duration)