Kokoro-82M generator — Core ML, flexible length, CPU
The Generator body of hexgrad/Kokoro-82M
v1.0 (iSTFTNet: upsampling convolutions, AdaIN residual blocks, inverse STFT as
transposed convolutions — Kokoro's disable_complex path), converted to an
fp16 Core ML ML Program (iOS 18+) with a flexible time axis.
| Input | Shape | Meaning |
|---|---|---|
x_pre |
[1, 512, L], L ∈ 2…2400 |
decoder state before the generator (80 per second) |
ref_s |
[1, 256] |
voice style; the generator uses ref_s[:, :128] |
har |
[1, 22, 60·L + 1] |
hn-NSF excitation spectrum: 11 magnitude rows, then 11 phase rows of torch.stft(n_fft=20, hop=5, center=True) |
Output: waveform, 24 kHz, 300·L samples.
Built for CPU (MLComputeUnits.cpuOnly); matches the PyTorch module to ~1e-4.
It complements the bucketed duration / F0 / decoder-pre graphs of
mattmireles/kokoro-coreml,
whose flexible har_post_range generator is GPU-only.
export_generator.py reproduces the conversion (torch 2.7, coremltools 9.0,
kokoro 0.9.4). Weights: hexgrad/Kokoro-82M, Apache-2.0.
- Downloads last month
- 6