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

StageToolPurposeWhere it runs
0 — Diagnostic analysismastering/scripts/diagnose.pyEvaluate the track: bandwidth ceilings, mono/stereo statusLocal CPU
1 — Super-resolutionLavaSR or NovaSRAdd missing high-frequency harmonicsLocal CPU
2 — Unified restorationSonicMasterFix up to 19 degradation types incl. EQ, dynamics, reverbCloud API / HuggingFace Space (needs 8 GB+ VRAM GPU)
3 — Quality visualizationmastering/scripts/visualize.pySpectrograms and before/after comparisonsLocal CPU
4 — Quality gatemastering/scripts/quality_gate.pyAutomated pass/fail detectionLocal CPU

Order is mandatory

Super-resolution (stage 1) must precede restoration (stage 2).

Sub-systems

SystemWhat it is
AudioSRDiffusion-based generative model predicting missing high-frequency content; versatile but slow on CPU, so LavaSR or cloud-based AudioSR is preferred for local workflows
SonicMasterFirst unified generative model for both restoration and mastering, covering 19 degradation types in a single forward pass, driven by text prompts or auto-correction