Spaces:
Running on Zero
Running on Zero
Commit Β·
813c771
1
Parent(s): fe18eeb
Fix xregen_mmaudio abort: raise duration floor and load overhead
Browse filesMMAudio regen was aborting (GPU task aborted, duration=10) because
the ZeroGPU allocation of 30s was too tight when open_clip model
(3.95GB) needed to download on cold start inside the GPU window.
- MMAUDIO_LOAD_OVERHEAD: 15 β 30s (covers cold-start download)
- Regen duration floor: 30 β 60s (matches initial gen minimum,
prevents abort when any model needs a cold-start download)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -345,7 +345,7 @@ TARO_SECS_PER_STEP = 0.05 # measured 0.043s/step on H200 (8.2s video, 2 segs Γ
|
|
| 345 |
TARO_LOAD_OVERHEAD = 15 # seconds: model load + CAVP feature extraction
|
| 346 |
MMAUDIO_WINDOW = 8.0 # seconds β MMAudio's fixed generation window
|
| 347 |
MMAUDIO_SECS_PER_STEP = 0.25 # measured 0.230s/step on H200 (8.3s video, 2 segs Γ 25 steps = 11.5s wall)
|
| 348 |
-
MMAUDIO_LOAD_OVERHEAD =
|
| 349 |
HUNYUAN_MAX_DUR = 15.0 # seconds β HunyuanFoley max video duration
|
| 350 |
HUNYUAN_SECS_PER_STEP = 0.35 # measured 0.328s/step on H200 (8.3s video, 1 seg Γ 50 steps = 16.4s wall)
|
| 351 |
HUNYUAN_LOAD_OVERHEAD = 55 # ~55s to load the 10GB XXL model weights into GPU
|
|
@@ -414,7 +414,7 @@ def _estimate_regen_duration(model_key: str, num_steps: int) -> int:
|
|
| 414 |
one segment β saves 30s of wasted ZeroGPU quota per regen call."""
|
| 415 |
cfg = MODEL_CONFIGS[model_key]
|
| 416 |
secs = int(num_steps) * cfg["secs_per_step"] + cfg["load_overhead"]
|
| 417 |
-
result = min(GPU_DURATION_CAP, max(
|
| 418 |
print(f"[duration] {cfg['label']} regen: 1 seg Γ {int(num_steps)} steps β {secs:.0f}s β capped {result}s")
|
| 419 |
return result
|
| 420 |
|
|
|
|
| 345 |
TARO_LOAD_OVERHEAD = 15 # seconds: model load + CAVP feature extraction
|
| 346 |
MMAUDIO_WINDOW = 8.0 # seconds β MMAudio's fixed generation window
|
| 347 |
MMAUDIO_SECS_PER_STEP = 0.25 # measured 0.230s/step on H200 (8.3s video, 2 segs Γ 25 steps = 11.5s wall)
|
| 348 |
+
MMAUDIO_LOAD_OVERHEAD = 30 # 15s warm + up to 30s cold-start model download
|
| 349 |
HUNYUAN_MAX_DUR = 15.0 # seconds β HunyuanFoley max video duration
|
| 350 |
HUNYUAN_SECS_PER_STEP = 0.35 # measured 0.328s/step on H200 (8.3s video, 1 seg Γ 50 steps = 16.4s wall)
|
| 351 |
HUNYUAN_LOAD_OVERHEAD = 55 # ~55s to load the 10GB XXL model weights into GPU
|
|
|
|
| 414 |
one segment β saves 30s of wasted ZeroGPU quota per regen call."""
|
| 415 |
cfg = MODEL_CONFIGS[model_key]
|
| 416 |
secs = int(num_steps) * cfg["secs_per_step"] + cfg["load_overhead"]
|
| 417 |
+
result = min(GPU_DURATION_CAP, max(60, int(secs)))
|
| 418 |
print(f"[duration] {cfg['label']} regen: 1 seg Γ {int(num_steps)} steps β {secs:.0f}s β capped {result}s")
|
| 419 |
return result
|
| 420 |
|