someone-in-the-world Claude Sonnet 4.6 commited on
Commit
c1f861c
·
1 Parent(s): 541b505

Raise ZeroGPU durations to 20s fast, 60s high-detail

Browse files

10s/30s caused aborts on cold ZeroGPU instances where Triton compilation
adds 10-20s to the first request. Each new concurrent instance recompiles,
so this isn't a one-time startup cost.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -352,7 +352,7 @@ def infer(images_b64_json, prompt, seed, randomize_seed, guidance_scale, steps,
352
  raise
353
 
354
 
355
- @spaces.GPU(duration=lambda *a, **kw: 10 if (len(a) > 7 and a[7] == "fast") else 30)
356
  def _infer_gpu(pil_images, prompt, seed, guidance_scale, steps, width, height, mode):
357
  _cuda_ok = torch.cuda.is_available()
358
  timer = _InferTimer(_cuda_ok)
 
352
  raise
353
 
354
 
355
+ @spaces.GPU(duration=lambda *a, **kw: 20 if (len(a) > 7 and a[7] == "fast") else 60)
356
  def _infer_gpu(pil_images, prompt, seed, guidance_scale, steps, width, height, mode):
357
  _cuda_ok = torch.cuda.is_available()
358
  timer = _InferTimer(_cuda_ok)