mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
@coderabbitai ignore ## Why BACKLOG "audio-separator 0.45–0.47 regression: mel-band RoFormer karaoke models 3–5× slower on L4". The root cause is **python-audio-separator #299 (0.47.0)**, not #298. #299 made RoFormer `overlap` a *window count* that defaults to each model YAML's `num_overlap`. Before that, `overlap` was effectively an 8-second step, which meant almost no overlap. The karaoke models' YAMLs set `num_overlap` 4/8, so a 3-minute track went from 23 forward passes to 87 (aufr33) and 124 (gabox_v2, becruily). That matches the measured 25→75s, 26→149s and 27→157s. 0.45.0 and 0.46.0 still had the old step formula. python-audio-separator #313 (released as **0.47.1**) keeps #299. It adds a per-model forward-pass budget test on every PR and a GPU per-pass timing test (T4: 1.21 s/pass), plus a README note. Andrew chose overlap=2 for gen: smoother chunk seams than 0.44's no-overlap, at about 1.5× the 0.44 compute instead of 4–6×. ## What - `karaoke_gen/audio_processor.py`: `SEPARATOR_MDXC_PARAMS` (overlap=2) goes to all four `Separator(...)` constructions (stage 1, stage 2 karaoke ensemble, single-model paths) **only when audio-separator ≥ 0.47**. On older versions `overlap=2` meant a 2-second step, which is 4× slower, so they keep their defaults. Ensembles load each model through `load_model`, so the param reaches every model in the preset. - `backend/Dockerfile.gpu-base`: `AUDIO_SEPARATOR_VERSION=0.47.1`, with the comment rewritten to explain the root cause. 0.47.1 needs `torch>=2.3` on Linux, so the pre-installed `torch==2.6.0+cu126` (required by the L4 driver) is kept. - The poetry lock stays on 0.44.1. The version-aware params keep CI and CPU images on the old semantics, and there's no torch churn. ## Expected cost per ~3-min track (forward passes) | model | 0.44.2 | 0.47 YAML default | 0.47 + overlap=2 | |---|---|---|---| | karaoke_aufr33 | 23 | 87 | 44 | | karaoke_gabox_v2 | 23 | 124 | 32 | | karaoke_becruily | 23 | 124 | 32 | | instrumental fv7z / resurrection | 23 | 32 / 21 | 32 / 21 | ## Verification plan (before /backlog-finish) After the deploy, time the separation of the daily E2E or a real job on the audio-separation-job logs. I expect roughly 1.5× the 0.44.2 karaoke-stage times (~40–50s per karaoke model rather than 75–157s). If it's worse, revert the pin to 0.44.2. That's one line. ## Testing - `tests/unit/test_audio_processor_local_gpu.py`: version gating (0.47.x/0.48/1.0 → overlap 2; 0.44/0.46 → defaults; unknown → defaults; fresh copy), and both stages' constructors receive `mdxc_params.overlap == 2`. - `make test`: the backend unit suite passes. The only failures are 8 `test_emulator_integration.py` tests, caused by my local environment: another session's emulator setup is on :8080/:4443, and they fail identically on untouched main. CI is green on main. - Local CodeRabbit: 0 findings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Jw21syo4HizJJjYw2mg2Vp --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>