EMA Lightning, ONNX, weights stored in 16 bits

The Turkish text-to-speech model EMA Lightning by canberkkkkkk, in the three ONNX graphs made by ozcancelik/ema-lightning-onnx, re-saved at about half the size: 18 MB instead of 35 MB.

Weights are stored in 16 bits; the arithmetic is still 32-bit. Each large weight tensor is kept as float16 and cast back to float32 when the graph loads. This is not the same as an fp16 graph, which also computes in 16 bits. Nothing is retrained. It is the same model and the same voice.

This is an unofficial copy, made for Elucify. All credit for the model goes to its author, and for the ONNX conversion to ozcancelik.

Files

File Size SHA-256
text.onnx 2.4 MB 9eae1cc88a1ead40dad773c9f02a6b89b10772c8eb33c70cbf02cec9853519f4
sound.onnx 9.4 MB 59c4a67e4967c9f952e30b26857a2ac537d40d71a7c17a987ea031b7608b9b27
decoder.onnx 6.1 MB 0c23ae715ac495f6828238e07258aad7da8a5eff63ef1b0fa22fcf9712a18fc1
meta.json vocabulary and constants, unmodified 76627201405723633f5319a208ed7dea63c42acbf3ca997671bccdca9d9186b2
to_half.py the script that made the three graphs

Made from these source files of ozcancelik/ema-lightning-onnx (SHA-256): text.onnx ad5d4885…4089f0, sound.onnx 95836421…a46a59, decoder.onnx 396c06a8…637b17.

Inputs, outputs and the JavaScript around the graphs are exactly as in ozcancelik's repository; use its web/tts.js and README. Opset 17. Output is 48 kHz mono.

How close it is to the original

Measured on three Turkish sentences (15.3 s of speech), with the same letters and the same noise fed to the original PyTorch model (ema-lightning 1.0.1) and to these graphs in ONNX Runtime on CPU:

Log-spectral distance Correlation of the waveforms
These graphs against PyTorch 0.13–0.15 dB 0.99995 or better
For scale: the same sentence from a different noise seed 8.3–8.8 dB about 0.06

Frame counts were identical. That is three sentences at batch size 1 and speed 1.0; nothing wider was tested.

Speed and memory

Speed and peak memory are the same as the float32 graphs, because the weights are float32 once loaded. Measured with onnxruntime-web (WASM, one thread):

Where Speed
Chrome on an M1 MacBook 5.7× real time (17× on four threads)
Chrome on an Android phone 1.5–1.7× real time
A Cloudflare Worker about 3.3× real time, about 83 MB of WASM memory

Licence

Apache-2.0, as the model and the conversion are. See LICENSE and NOTICE.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for oneryalcin/ema-lightning-onnx-half

Quantized
(7)
this model