multimodalart HF Staff commited on
Commit
bb40d9f
·
verified ·
1 Parent(s): 2d8e30a

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -71,8 +71,11 @@ denoiser = _build_model().to("cuda")
71
 
72
 
73
  def _estimate_duration(class_name, num_steps, *args, **kwargs):
74
- # Heun sampling: ~2 * steps NFE per stage on the two hierarchical stages.
75
- return min(300, 30 + int(num_steps) * 2 * 2 * 2)
 
 
 
76
 
77
 
78
  @spaces.GPU(duration=_estimate_duration)
 
71
 
72
 
73
  def _estimate_duration(class_name, num_steps, *args, **kwargs):
74
+ # Measured on ZeroGPU (sm_120): ~4.6s of model time at 10 steps, ~8.3s at
75
+ # 25 steps, ~17.3s at 50 steps (Heun = 2 NFE per step, two hierarchical
76
+ # stages). ~0.35s/step; budget 1.5x that to absorb cold-start weight
77
+ # streaming and load variance, floored for the smallest runs.
78
+ return min(60, max(10, 2 + int(num_steps * 0.5)))
79
 
80
 
81
  @spaces.GPU(duration=_estimate_duration)