Kokoro-82M ALBERT β Core ML, 512 tokens
One re-exported sub-model: the ALBERT encoder from the segmented Core ML port of hexgrad/Kokoro-82M. Nothing else. Use it with the other three segments from mweinbach/Kokoro-82M-Swift.
Why this exists
In mweinbach/Kokoro-82M-Swift, under CoreML_ANE/segmented/, the four chained
models do not agree on their input length:
| segment | declared input |
|---|---|
albert |
[1, 64] |
prosody |
[1, 512] |
text_encoder |
[1, 512] |
decoder |
[1, 512] |
All four shapes are fixed β no flexible ranges, no enumerated shapes. The
pipeline is therefore capped by the smallest of them, and after the two sentinel
tokens that leaves 62 phonemes, roughly ten words, per forward pass. The
upstream converter takes a single --max-tokens that defaults to 512, so the
published albert.mlpackage looks like it came from a different run than its
three siblings.
This repository holds ALBERT re-exported at 512 from the same
kokoro-v1_0.pth weights, which lifts the pipeline to 510 phonemes β
about 85 words, and the number the voice packs' 510 rows of style vectors were
always built for.
It is the same model
Only the declared buffer size changed. Feeding identical phonemes through the published 64-token ALBERT and through this one, with the other three segments untouched, produces bitwise-identical audio: 111,000 samples, 4.625 s, maximum absolute difference 0.000e+00.
Layout
albert.mlpackage/
Manifest.json
Data/com.apple.CoreML/model.mlmodel
Data/com.apple.CoreML/weights/weight.bin
Drop it in beside the other three packages, replacing the published
albert.mlpackage.
Reproducing it
Scripts/reexport-albert.sh in
openreader-ios is the exact
recipe: Python 3.11, torch==2.7.0 (the version coremltools is tested against),
upstream's own convert_to_coreml_segmented.py with --max-tokens 512, and the
ALBERT package copied out of the result.
License
Apache 2.0, inherited from Kokoro-82M and from the conversion script.
- Downloads last month
- 1