Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions acestep/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,19 @@ def trt_engine_path(engine_name: str) -> Path:
# scripts/benchmarks/vram_60s_vs_240s_results.md. Pick the smallest profile
# that fits the audio (see `select_trt_engines` and `available_trt_engines`).
_TRT_ENGINE_PROFILES: dict[float, dict[str, str]] = {
# 30s decoder for the loop-focused / short-source workflow: a smaller
# seq_max (750 frames vs 1500) reserves less DiT activation workspace
# (VRAM headroom) and is opt-tuned at 750 for lower param-update
# latency. The VAE engines are intentionally the 60s builds — the
# walk-window path keeps vae_encode sized to the full song, and the
# 60s vae_decode already accepts ≤1500 frames, so 750-frame decodes
# need no dedicated engine. Build with
# ``python -m acestep.engine.trt.build --all --duration 30 --decoder-only``.
30.0: {
"decoder": "spectral_decoder_mixed_refit_b8_30s",
"vae_encode": "vae_encode_fp16_60s",
"vae_decode": "vae_decode_fp16_60s",
},
60.0: {
"decoder": "spectral_decoder_mixed_refit_b8_60s",
"vae_encode": "vae_encode_fp16_60s",
Expand Down
19 changes: 19 additions & 0 deletions docs/TRT.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ Build only decoder engines:
uv run python -m acestep.engine.trt.build --all --decoder-only --duration 60
```

Build the 30s loop-window decoder (decoder-only):

```powershell
uv run python -m acestep.engine.trt.build --all --decoder-only --duration 30
```

The `30.0` profile in `acestep/paths.py` serves the loop-focused /
short-source workflow (`walk_window_s = 30`, or any source ≤ 30s). Its
`seq_max` is 750 frames (vs 1500 for 60s), so the DiT context reserves
less activation workspace and is opt-tuned at 750 for lower
param-update latency. It is **decoder-only**: the profile reuses the
existing 60s VAE engines, because the walk-window path keeps
`vae_encode` sized to the full song and the 60s `vae_decode` already
accepts ≤ 1500-frame inputs. (A dedicated sub-60s VAE engine is not
needed and currently fails the TRT optimization-profile check on
Blackwell — see `RTX 5090 / Blackwell VAE Builds` above.) Measured on a
5090 vs running the same 750-frame window on the 60s engine: ~12% faster
warm generate (0.121s vs 0.137s) and ~0.25 GB less process VRAM.

Build only VAE engines:

```powershell
Expand Down