Skip to content

Commit 2a25c9f

Browse files
tillltmekotools
authored andcommitted
docs(mel-band-roformer): Change 176 env vars + cleanroom attribution header
Document CRISPASR_MELBAND_GGML/GPU/FUSED/SEG_S/NO_SEGMENT in docs/environment-variables.md in the htdemucs-CrispStrobe#414 style (AUTO semantics, measured numbers, test reference). Add the BSRoformer.cpp cleanroom attribution note the maintainer asked for in CrispStrobe#415 to the file header.
1 parent 88dd2df commit 2a25c9f

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

docs/environment-variables.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,32 @@ All three optimisation gates are output-equivalent: the per-stage diff reports
844844

845845
### Mel-Band RoFormer (source separation)
846846

847-
- `CRISPASR_MBR_PROFILE`
847+
- `CRISPASR_MBR_PROFILE` — print a per-stage wall-time breakdown of one forward
848+
pass (stft+pack / band_split / run_time / run_freq / mask_est / synthesize).
849+
- `CRISPASR_MELBAND_GGML` — run the ggml graph path instead of the legacy CPU
850+
path. Since the Change-176 graph port the default is **AUTO**: ON exactly
851+
when a real GPU backend is present and permitted (the fused single graph
852+
measured ~112x faster than the per-layer graphs — RTF ~0.09 vs ~10 on an
853+
RTX 3090 Ti), OFF on CPU-only hosts. `=1`/`=0` force either way.
854+
- `CRISPASR_MELBAND_GPU` — GPU permission (CUDA > Metal > Vulkan). Default
855+
AUTO follows the caller's use_gpu (CLI default on); an explicit `=0`/`=1`
856+
beats the caller in both directions — so `=0` genuinely opts out even
857+
though the CLI defaults `use_gpu=true` (#414 review semantics). On GPU-less
858+
hosts everything resolves to the CPU path regardless.
859+
- `CRISPASR_MELBAND_FUSED` — single fused graph: band-split + the full
860+
time/freq transformer stack + mask estimator on-device in one graph, no
861+
per-layer host↔device roundtrips (the measured-fastest path on GPU).
862+
Default **AUTO**: ON with the GPU graph path, OFF otherwise. `=1` alone
863+
implies the graph path it needs; `=0` on GPU keeps the per-layer-graph
864+
bisection arm. The full decision table is unit-locked in
865+
tests/test-mel-band-gates.cpp.
866+
- `CRISPASR_MELBAND_SEG_S` — override the Demucs-style segment length in
867+
seconds (`params.segment_seconds`; <=0 → default 10 s). The attention
868+
matrix is O(T²·bands·heads), so long inputs are split into ~10 s segments
869+
with 25% overlap and a triangular weight (bounds VRAM; the unsegmented
870+
whole-buffer path OOMs on any clip beyond ~10 s).
871+
- `CRISPASR_MELBAND_NO_SEGMENT` — process the whole track in one pass instead
872+
of the segmented overlap-add schedule (A/B against the old behaviour).
848873

849874
### MeloTTS
850875

src/mel_band_roformer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
//
1111
// Blueprint: MIT lucidrains/BS-RoFormer. Weights: KimberleyJSN/melbandroformer
1212
// (MIT). Reference pinned at bs-roformer==0.3.10. See docs/mel-band-roformer/PLAN.md.
13+
//
14+
// Change 176: the ggml-graph paths (band-split, transformer blocks, fused
15+
// single graph) were written cleanroom following the in-repo htdemucs graph
16+
// pattern, with chenmozhijin/BSRoformer.cpp (MIT) used strictly as a
17+
// reference/oracle for graph structure and correctness — no code copied.
18+
// Parity is verified against this file's own validated CPU path (cos=1.0).
1319

1420
#include "mel_band_roformer.h"
1521

0 commit comments

Comments
 (0)