luca115 commited on
Commit
1c07dc3
·
verified ·
1 Parent(s): aec0f0e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -134,7 +134,7 @@ def get_duration(input_image, prompt, temperature, top_p, max_new_tokens, log_pr
134
  # Generation speed is ~40 tok/s on ZeroGPU; a full 512-token caption measured
135
  # ~13s wall. Scale the GPU request with the token budget instead of the 60s
136
  # default so anonymous visitors with small quotas aren't rejected up front.
137
- return min(90, 12 + int(max_new_tokens) // 25)
138
 
139
 
140
  @spaces.GPU(duration=get_duration)
 
134
  # Generation speed is ~40 tok/s on ZeroGPU; a full 512-token caption measured
135
  # ~13s wall. Scale the GPU request with the token budget instead of the 60s
136
  # default so anonymous visitors with small quotas aren't rejected up front.
137
+ return min(60, 6 + int(max_new_tokens) // 40)
138
 
139
 
140
  @spaces.GPU(duration=get_duration)