Mastering Pipeline
The mastering system is a distinct pipeline, separate from the root uv workspace, optimized CPU-first for Debian 12 with no GPU.
Stages
| Stage | Tool | Purpose | Where it runs |
|---|---|---|---|
| 0 — Diagnostic analysis | mastering/scripts/diagnose.py | Evaluate the track: bandwidth ceilings, mono/stereo status | Local CPU |
| 1 — Super-resolution | LavaSR or NovaSR | Add missing high-frequency harmonics | Local CPU |
| 2 — Unified restoration | SonicMaster | Fix up to 19 degradation types incl. EQ, dynamics, reverb | Cloud API / HuggingFace Space (needs 8 GB+ VRAM GPU) |
| 3 — Quality visualization | mastering/scripts/visualize.py | Spectrograms and before/after comparisons | Local CPU |
| 4 — Quality gate | mastering/scripts/quality_gate.py | Automated pass/fail detection | Local CPU |
Order is mandatory
Super-resolution (stage 1) must precede restoration (stage 2).
Sub-systems
| System | What it is |
|---|---|
| AudioSR | Diffusion-based generative model predicting missing high-frequency content; versatile but slow on CPU, so LavaSR or cloud-based AudioSR is preferred for local workflows |
| SonicMaster | First unified generative model for both restoration and mastering, covering 19 degradation types in a single forward pass, driven by text prompts or auto-correction |