Instructions to use Phangster/kokoro-82m-v1.0-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Phangster/kokoro-82m-v1.0-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'Phangster/kokoro-82m-v1.0-onnx');
Kokoro-82M v1.0 ONNX (external data)
The fp32 ONNX export of hexgrad/Kokoro-82M v1.0, from
onnx-community/Kokoro-82M-v1.0-ONNX,
re-saved with its weights in a separate file (onnx/model.onnx_data).
Weights and graph are unchanged. With external data, ONNX Runtime Web's WebGPU backend uploads the weights straight to the GPU instead of copying them through WebAssembly memory, which cuts about 400 MB of browser memory. Audio output is bit-identical to the original.
- Source file:
onnx/model.onnxfrom onnx-community/Kokoro-82M-v1.0-ONNX, SHA-2568fbea51ea711f2af382e88c833d9e288c6dc82ce5e98421ea61c058ce21a34cb - Conversion:
onnx.save_model(model, "model.onnx", save_as_external_data=True, all_tensors_to_one_file=True, location="model.onnx_data", size_threshold=1024) - Load with transformers.js:
from_pretrained(id, { dtype: "fp32", device: "webgpu", use_external_data_format: true })
Voices are not included; use the voices/ files from the onnx-community repository.
License
Apache-2.0, the same as Kokoro-82M. All credit for the model goes to its authors.
- Downloads last month
- 30