File size: 2,477 Bytes
0e9984c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
license: mit
library_name: audiosronnx
pipeline_tag: audio-to-audio
tags: [audio-super-resolution, bandwidth-extension, flow-matching, bigvgan, onnx]
---

# audiosronnx-flowhigh

ONNX exports of [FLowHigh](https://github.com/jjunak-yun/FLowHigh_code) (Yun et al.,
ICASSP 2025, MIT) for the `flowhigh` engine in
[audiosronnx](https://github.com/TigreGotico/audiosronnx), together with the
[BigVGAN](https://github.com/NVIDIA/BigVGAN) 48 kHz vocoder it decodes through
(NVIDIA, MIT).

FLowHigh upscales speech to 48 kHz with **conditional flow matching**: instead of denoising
over tens of diffusion steps it learns a velocity field and integrates it over four Euler
steps, which makes a generative super-resolution model practical on CPU.

| File | Shape | Size |
|------|-------|------|
| `flowfield.onnx` | `x[1,T,256], times[1], cond[1,T,256] -> velocity[1,T,256]` | 141.9 MB |
| `bigvgan.onnx` | `mel[1,256,T] -> waveform[1,1,480*T]` | 57.3 MB |

The log-mel front-end, the Euler loop and the spectral merge all run in numpy inside
audiosronnx, so inference is onnxruntime-only.

Validated against the upstream pipeline: mel front-end **corr 0.99999999**, the ODE loop
plus vocoder **corr 1.00000000** (max abs err 6.7e-06), and the full pipeline
**corr 0.99999993**. Both graphs verified length-independent.

## Export notes

Two tracing obstacles, each fixed by a rewrite that is bit-for-bit equivalent to the
original:

- **BigVGAN's alias-free resamplers** build their depthwise kernel at call time via
  `filter.expand(C, -1, -1)`, so the tracer sees a convolution of unknown kernel shape. The
  channel count is fixed per layer, so all 182 expanded kernels are materialised as buffers.
- **Rotary positions** were derived from `seq_len`, which under tracing arrives as a 0-dim
  tensor and skips `RotaryEmbedding`'s `arange` branch. Positions are built explicitly,
  which is correct eagerly and stays dynamic when traced.

Neither is an architectural limitation.

## Usage

```python
from audiosronnx import load_sr

sr = load_sr("flowhigh")
sr.upscale_file("narrowband.wav", "wide_48k.wav")

load_sr("flowhigh", steps=8)      # more Euler steps: more compute, more fidelity
load_sr("flowhigh", seed=None)    # upstream's non-reproducible sampling
```

Sampling starts from `mel(cond) + eps`. Upstream draws `eps` freshly each run, so its output
is not reproducible; the adapter seeds it by default.

## License

MIT — FLowHigh and NVIDIA BigVGAN are both MIT.