File size: 1,237 Bytes
7264ecd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: mit
library_name: mlx
tags:
  - audio
  - audio-super-resolution
  - mlx
base_model: haoheliu/audiosr_basic
---

# AudioSR basic, trimmed

The released [AudioSR](https://github.com/haoheliu/versatile_audio_super_resolution)
`basic` checkpoint, cut down to what super-resolution runs and saved as
safetensors. It is used by IntelligenceKit's `MLXAudioSR` (Swift, MLX) and
by `afm upscale`.

`basic.safetensors`, 2.69 GB, float32, with PyTorch names and layouts. It holds:

- `model.`: the diffusion UNet
- `first_stage_model.`: the VAE and its 48 kHz HiFi-GAN vocoder
- the scale factor and the noise schedule's buffers

These are left out:

- CLAP, which super-resolution doesn't use;
- the EMA copy of the UNet, since inference uses the live weights;
- the condition encoder's VAE, which is identical to `first_stage_model`.

The MLX port casts to float16 at load time.

`convert.py`, the script that made the file:

```sh
python convert.py basic basic.safetensors
```

## Parity

The MLX port matches PyTorch stage by stage, from 76 to 137 dB SNR. It was
tested on a clip low-passed at 6 kHz and scored by LSD against the original
(lower is better):

| | LSD |
|---|---|
| input | 3.88 |
| PyTorch | 1.16 |
| MLX | 1.14 |