From 27678b0e64aff06d7e6609b426336c93a2ca2fe1 Mon Sep 17 00:00:00 2001 From: translator Date: Thu, 26 Mar 2026 15:14:41 +0900 Subject: [PATCH] Myriad updates. --- .github/workflows/zfturbo-manifest-drift.yml | 37 + 20260313_Fixes (Copilot).md | 1427 +++++++++++++++ ...p_Findings_and_ZFTurbo_Integration_Plan.md | 257 +++ 20260326_QA_BS_Adapter_Probe_results.json | 33 + ...QA_GaboxKaraokeFolder_GaboxV1_results.json | 112 ++ 20260326_QA_GaboxKaraokeFolder_Integration.md | 94 + 20260326_QA_Matrix_Execution_Step1.md | 83 + 20260326_QA_Matrix_Execution_Step2.md | 122 ++ 20260326_QA_Matrix_Execution_Step3.md | 128 ++ ...326_QA_Matrix_Execution_Step3_results.json | 443 +++++ 20260326_QA_Matrix_Execution_Step4.md | 140 ++ ...326_QA_Matrix_Execution_Step4_results.json | 215 +++ 20260326_QA_Matrix_Execution_Step5.md | 195 +++ ...trix_Execution_Step5_BSMamba2_results.json | 137 ++ ...rix_Execution_Step5_SCNetTran_results.json | 200 +++ 20260326_QA_Matrix_Execution_Step6.md | 79 + ...Execution_Step6_BSPolarformer_results.json | 112 ++ README.md | 189 +- SUMMARIES.md | 100 ++ backend/config.py | 120 ++ .../upstream_zfturbo_models.yaml | 88 + backend/routers/models.py | 79 + backend/routers/projects.py | 29 +- backend/routers/separate.py | 271 +++ backend/scripts/check_zfturbo_updates.py | 154 ++ .../scripts/probe_bs_adapter_feasibility.py | 136 ++ .../services/bs_roformer_chorus_separator.py | 61 +- backend/services/bs_roformer_separator.py | 150 +- backend/services/mdxnet_separator.py | 60 + backend/services/medleyvox_separator.py | 5 +- .../services/mel_band_roformer_separator.py | 188 +- .../mel_band_specialized_separator.py | 666 ++++++- backend/services/project_reprocess_service.py | 20 +- backend/services/project_service_common.py | 16 +- backend/services/scnet_separator.py | 149 +- backend/services/separation/chunking.py | 211 +++ backend/services/separation/execution.py | 116 +- backend/services/separation/model_registry.py | 33 + backend/services/separation/output_layout.py | 77 +- backend/services/separation/power_presets.py | 138 +- backend/services/separator_service.py | 1559 +++++++++++++++-- backend/services/subsonic_service.py | 30 +- backend/tests/test_chunking.py | 299 ++++ docs/API_REFERENCE.md | 191 ++ docs/CONFIGURATION_REFERENCE.md | 250 +++ docs/DEVELOPER_GUIDE.md | 459 +++++ docs/GPU_TUNING_GUIDE.md | 235 +++ docs/KARAOKE_PIPELINE_PLAN.md | 276 +++ docs/LONG_TRACK_CHUNKING_PLAN.md | 266 +++ docs/TROUBLESHOOTING_LONG_TRACKS.md | 456 +++++ docs/TROUBLESHOOTING_MATRIX.md | 14 + docs/UVR_VS_STEMENGINE.md | 331 ++++ frontend/src/api/client.ts | 50 + .../src/components/AutoPipelineDialog.tsx | 35 +- frontend/src/components/DynamicMixPlayer.tsx | 13 +- frontend/src/pages/ProjectDetail.tsx | 72 +- frontend/src/pages/Separator.tsx | 75 +- frontend/src/pages/Settings.tsx | 61 +- frontend/src/utils/autoPipeline.ts | 18 +- stemengine.yml | 28 +- 60 files changed, 11368 insertions(+), 220 deletions(-) create mode 100644 .github/workflows/zfturbo-manifest-drift.yml create mode 100644 20260326_MVSep_Findings_and_ZFTurbo_Integration_Plan.md create mode 100644 20260326_QA_BS_Adapter_Probe_results.json create mode 100644 20260326_QA_GaboxKaraokeFolder_GaboxV1_results.json create mode 100644 20260326_QA_GaboxKaraokeFolder_Integration.md create mode 100644 20260326_QA_Matrix_Execution_Step1.md create mode 100644 20260326_QA_Matrix_Execution_Step2.md create mode 100644 20260326_QA_Matrix_Execution_Step3.md create mode 100644 20260326_QA_Matrix_Execution_Step3_results.json create mode 100644 20260326_QA_Matrix_Execution_Step4.md create mode 100644 20260326_QA_Matrix_Execution_Step4_results.json create mode 100644 20260326_QA_Matrix_Execution_Step5.md create mode 100644 20260326_QA_Matrix_Execution_Step5_BSMamba2_results.json create mode 100644 20260326_QA_Matrix_Execution_Step5_SCNetTran_results.json create mode 100644 20260326_QA_Matrix_Execution_Step6.md create mode 100644 20260326_QA_Matrix_Execution_Step6_BSPolarformer_results.json create mode 100644 backend/model_catalog/upstream_zfturbo_models.yaml create mode 100644 backend/scripts/check_zfturbo_updates.py create mode 100644 backend/scripts/probe_bs_adapter_feasibility.py create mode 100644 backend/services/separation/chunking.py create mode 100644 backend/tests/test_chunking.py create mode 100644 docs/GPU_TUNING_GUIDE.md create mode 100644 docs/KARAOKE_PIPELINE_PLAN.md create mode 100644 docs/LONG_TRACK_CHUNKING_PLAN.md create mode 100644 docs/TROUBLESHOOTING_LONG_TRACKS.md create mode 100644 docs/UVR_VS_STEMENGINE.md diff --git a/.github/workflows/zfturbo-manifest-drift.yml b/.github/workflows/zfturbo-manifest-drift.yml new file mode 100644 index 0000000..23d1f14 --- /dev/null +++ b/.github/workflows/zfturbo-manifest-drift.yml @@ -0,0 +1,37 @@ +name: ZFTurbo Manifest Drift Guard + +on: + workflow_dispatch: + schedule: + - cron: '17 4 * * *' + +jobs: + drift-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install checker deps + run: | + python -m pip install --upgrade pip + pip install pyyaml + + - name: Run strict upstream drift check + run: | + python backend/scripts/check_zfturbo_updates.py \ + --manifest backend/model_catalog/upstream_zfturbo_models.yaml \ + --json-out zfturbo_updates_report.json \ + --strict + + - name: Upload drift report artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: zfturbo-updates-report + path: zfturbo_updates_report.json diff --git a/20260313_Fixes (Copilot).md b/20260313_Fixes (Copilot).md index 47be090..5dafc97 100644 --- a/20260313_Fixes (Copilot).md +++ b/20260313_Fixes (Copilot).md @@ -14,6 +14,1075 @@ The goal is **not** a rewrite. The goal is to improve: --- +## 2026-03-26 Backend implementation — MVSep/ZFTurbo model integration pass + +Implemented the first execution pass of the ZFTurbo integration plan and public +MVSep-related model additions. + +### Added model integrations + +- New karaoke model: + - `bs_roformer_karaoke_frazer_becruily` +- New SCNet masked models: + - `scnet_masked_xl_ihf` + - `scnet_masked_small` + +### Backend changes + +- Updated model registration in `backend/config.py` for the new IDs. +- Extended capability metadata in `backend/services/separation/model_registry.py`: + - Added `BSR_KARAOKE_SPECIAL_MODELS` + - Marked `bs_roformer_karaoke_frazer_becruily` as lead/back-capable. +- Updated separation dispatch in `backend/services/separator_service.py`: + - BS specialized karaoke models are now routed before generic BS prefix handling. + - Added explicit separator selection for `bs_roformer_karaoke_frazer_becruily`. +- Added `MelBandKaraokeFrazerBecruilySeparator` in + `backend/services/mel_band_specialized_separator.py`. +- Extended SCNet model map in `backend/services/scnet_separator.py`: + - Added masked variants + - Added URL-based artifact download fallback for release-hosted assets. +- Updated model metadata + directory mapping in `backend/routers/models.py`. + +### Upstream tracking foundation (Phase A) + +- Added model catalog manifest: + - `backend/model_catalog/upstream_zfturbo_models.yaml` +- Added release-check script: + - `backend/scripts/check_zfturbo_updates.py` + +### Documentation updates + +- Updated model family table and lead/back-capable model list in `README.md`. +- Updated implementation status in + `20260326_MVSep_Findings_and_ZFTurbo_Integration_Plan.md`. + +### Next-step execution (2026-03-26): CI drift guard + QA baseline + +Implemented the next recommended execution step after model integration. + +#### CI drift guard + +- Added workflow: + - `.github/workflows/zfturbo-manifest-drift.yml` +- Schedule: daily + manual dispatch. +- Added strict checker mode in: + - `backend/scripts/check_zfturbo_updates.py` +- Strict mode (`--strict`) now exits non-zero when manifest entries are behind + latest upstream tag or pinned to unknown tags. + +#### QA baseline execution + +- Ran upstream checker (non-strict) and strict mode locally. +- Strict mode correctly returned exit code `1` due to current upstream drift. +- Ran chunking unit suite: + - `python3 -m unittest tests.test_chunking -v` + - Result: `19` tests, `OK`. + +Detailed run log and status are documented in: + +- `20260326_QA_Matrix_Execution_Step1.md` + +### Runtime QA execution attempt (Step 2) — environment blockers captured + +Attempted to execute the next matrix step (real inference runs) and documented +command-level blockers. + +Observed blockers: + +- Local API unavailable (`localhost:8000` not running). +- Local Python runtime missing `uvicorn`. +- Compose startup initially failed due to unresolved `PROJECTS` path variable. +- Compose startup with explicit path vars reached image pull stage, then failed + with registry auth error for `ghcr.io/seclusionenthusiast/stemengine:latest`. + +Documented in: + +- `20260326_QA_Matrix_Execution_Step2.md` + +### Runtime QA execution attempt (Step 2) — local-image unblock applied + +Applied cleaner local-only compose configuration for backend runtime: + +- Updated `stemengine.yml` backend service: + - `image: stemengine:latest` + - `pull_policy: never` + +Validation: + +- `docker compose -f stemengine.yml up -d stemengine` (with `SEFOLDER` + `PROJECTS` env) +- `GET /api/system/health` returned `200 OK` + +Result: + +- Runtime bring-up blocker resolved; matrix execution can proceed. + +### Runtime QA matrix execution (Step 3) — completed + +Executed the full recommended matrix for newly integrated models: + +- Models: + - `bs_roformer_karaoke_frazer_becruily` + - `scnet_masked_xl_ihf` + - `scnet_masked_small` +- Buckets: + - short / medium / long (from available import corpus) +- Tiers: + - `eco` / `standard` / `performance` + +Total runs: + +- `27` (`3 × 3 × 3`) + +Outcome: + +- `27/27` completed with `status=done`. +- Output contracts matched expected stem layouts for all runs. +- Diagnostics captured and summarized, including tier policy and chunking status. + +Artifacts: + +- `20260326_QA_Matrix_Execution_Step3.md` +- `20260326_QA_Matrix_Execution_Step3_results.json` + +### Runtime QA long-track blocker closure (Step 4) — completed + +Implemented and documented the remaining blocker from Step 3: + +- Added a long-track QA input `>=480s` by deriving: + - `imports/QA_Long_PeterTosh_x2.flac` (`~694.107s`) +- Executed focused runtime matrix: + - `3 models × 3 tiers = 9` runs + - `POST /api/separate/from-path` + - all `9/9` runs completed with `status=done` + +Artifacts: + +- `20260326_QA_Matrix_Execution_Step4.md` +- `20260326_QA_Matrix_Execution_Step4_results.json` + +### Step 4 follow-up fix — diagnostics family/chunking classification + +During Step 4, BS karaoke runs completed successfully but diagnostics reported +`family=other` and `chunking.active=false` for a `>=480s` input. This was a +diagnostics classification gap. + +Fix implemented: + +- Updated `backend/services/separator_service.py` (`_build_separation_diagnostics`) + - included `BSR_KARAOKE_SPECIAL_MODELS` in roformer chunk-support classification. + +Validation: + +- Re-ran one long-track BS karaoke job (`bs_roformer_karaoke_frazer_becruily`, `eco`): + - `family=roformer` + - `chunking.supported=true` + - `chunking.active=true` + +The recheck row is appended in Step 4 results with note: + +- `post-fix diagnostics recheck after family classification patch` + +### Next action appended + +With the long-track chunking QA blocker resolved, the next execution focus is: + +1. integrate/evaluate `scnet_tran_small` and run runtime matrix +2. run adapter-candidate probes for `bs_polarformer`, `bs_mamba2`, `bs_conformer` + +### Step 5 implementation (SCNet Tran + BS adapter path) — completed + +Implemented and validated the requested Step 5 execution scope. + +#### `scnet_tran_small` integration and matrix + +- Integrated `scnet_tran_small` into runtime/catalog metadata. +- Fixed SCNet constructor compatibility for forward YAML keys by filtering + unsupported kwargs before `SCNet(...)` initialization. +- Executed full matrix (`short/medium/long × eco/standard/performance`). + +Artifact: + +- `20260326_QA_Matrix_Execution_Step5_SCNetTran_results.json` + +Outcome: + +- `9/9` done + +#### BS adapter feasibility probes + +- Added probe utility: + - `backend/scripts/probe_bs_adapter_feasibility.py` +- Captured summarized probe artifact: + - `20260326_QA_BS_Adapter_Probe_results.json` + +Probe outcomes: + +- `bs_polarformer`: constructor/load OK +- `bs_mamba2`: constructor/load OK +- `bs_conformer`: constructor OK, state-load FAIL (shape mismatch) + +#### Integrated next feasible candidate + repeated matrix + +- Integrated `bs_mamba2_v1` adapter routing into BS-RoFormer path. +- Added runtime asset download wiring for checkpoint/config URLs. +- Updated BS stem merge logic to support passthrough output contracts + (non-6-stem adapter outputs). +- Executed repeat matrix for the integrated candidate. + +Artifact: + +- `20260326_QA_Matrix_Execution_Step5_BSMamba2_results.json` + +Outcome: + +- `9/9` done +- stable output contract: `vocals`, `other` + +### Step 6 follow-up (next option) — `bs_polarformer_v1` integrated + +Continued execution of the remaining feasible BS adapter option from probe results. + +Implemented: + +- Added `bs_polarformer_v1` to specialized BS model registration (`backend/config.py`). +- Added adapter passthrough stem-mode metadata (`backend/services/separation/model_registry.py`). +- Added runtime adapter asset URLs/download handling for Polarformer v1 + (`backend/services/separator_service.py`). +- Added model metadata and exact model directory mapping (`backend/routers/models.py`). +- Updated model catalog status to validated + (`backend/model_catalog/upstream_zfturbo_models.yaml`). + +Validation: + +- Smoke job: `status=done`, stems `other` + `vocals`. +- 3×3 matrix executed (`short/medium/long × eco/standard/performance`): + - `6` rows `done` + - `3` medium rows failed due pre-existing ffmpeg decode error on medium QA + source WAV (not model path regression) +- Performance tier exhibited OOM retry events and recovered in-place without + fallback handoff. + +Artifacts: + +- `20260326_QA_Matrix_Execution_Step6.md` +- `20260326_QA_Matrix_Execution_Step6_BSPolarformer_results.json` + +--- + +## 2026-03-25 Frontend bugfix — Mixes playback time stuck at `0:00` until refresh + +Fixed a Mixes playback issue where `DynamicMixPlayer` could show total duration as +`0:00` until the page was manually refreshed. + +### Root cause + +- In `DynamicMixPlayer`, the stem wiring effect reset `duration` to `0` on every + effect run. +- Parent rerenders / stem-array identity churn can re-run that effect after + metadata is already loaded. +- Existing `