Add files using upload-large-folder tool
Browse files- README.md +108 -0
- graph.json +0 -0
- manifest.json +141 -0
- weights.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: KittenML/kitten-tts-mini-0.8
|
| 4 |
+
tags:
|
| 5 |
+
- rlx
|
| 6 |
+
- text-to-speech
|
| 7 |
+
- onnx
|
| 8 |
+
- safetensors
|
| 9 |
+
library_name: rlx-models
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Kitten TTS mini 0.8 — RLX bundle
|
| 13 |
+
|
| 14 |
+
RLX compile bundle for [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8). Replaces ONNX Runtime at inference time: `rlx-kittentts` loads `graph.json` + `weights.safetensors`, lowers to RLX HIR, and compiles with `rlx-runtime`.
|
| 15 |
+
|
| 16 |
+
**Upstream weights (required):** download [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8) for `config.json` and `voices.npz`.
|
| 17 |
+
|
| 18 |
+
## Files
|
| 19 |
+
|
| 20 |
+
| File | Description |
|
| 21 |
+
|------|-------------|
|
| 22 |
+
| `graph.json` | RLX graph IR (3006 nodes) |
|
| 23 |
+
| `weights.safetensors` | Decomposed model weights (~350 MB) |
|
| 24 |
+
| `manifest.json` | Export metadata (op histogram, I/O shapes) |
|
| 25 |
+
|
| 26 |
+
## Quick start
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
# 1. Upstream ONNX checkpoint + voices
|
| 30 |
+
huggingface-cli download KittenML/kitten-tts-mini-0.8 --local-dir .cache/kittentts-mini-0.8
|
| 31 |
+
|
| 32 |
+
# 2. This RLX bundle (merge into the same directory)
|
| 33 |
+
huggingface-cli download eugenehp/kitten-tts-mini-0.8-rlx --local-dir .cache/kittentts-mini-0.8
|
| 34 |
+
|
| 35 |
+
# 3. Sentinel file for native auto-detection (same bytes as weights.safetensors)
|
| 36 |
+
ln -sf weights.safetensors .cache/kittentts-mini-0.8/model.safetensors
|
| 37 |
+
|
| 38 |
+
# 4. Synthesize (from rlx-models checkout)
|
| 39 |
+
cargo run -p rlx-kittentts --features native --release -- \
|
| 40 |
+
--model-dir .cache/kittentts-mini-0.8 \
|
| 41 |
+
--native --ipa "həˈloʊ" --voice Jasper --out-wav out.wav
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Or with `just`:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
just fetch-kittentts
|
| 48 |
+
huggingface-cli download eugenehp/kitten-tts-mini-0.8-rlx \
|
| 49 |
+
--local-dir .cache/kittentts-mini-0.8
|
| 50 |
+
ln -sf weights.safetensors .cache/kittentts-mini-0.8/model.safetensors
|
| 51 |
+
just kittentts -- --native --ipa "həˈloʊ" --out-wav /tmp/out.wav
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## Layout after merge
|
| 55 |
+
|
| 56 |
+
```text
|
| 57 |
+
.cache/kittentts-mini-0.8/
|
| 58 |
+
config.json # from KittenML
|
| 59 |
+
voices.npz # from KittenML
|
| 60 |
+
kitten_tts_mini_v0_8.onnx
|
| 61 |
+
model.safetensors # symlink → weights.safetensors
|
| 62 |
+
graph.json # this repo
|
| 63 |
+
manifest.json
|
| 64 |
+
weights.safetensors
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Alternatively, keep `rlx_bundle/` as a subdirectory and set `RLX_ONNX_BUNDLE` to that path.
|
| 68 |
+
|
| 69 |
+
## Environment variables
|
| 70 |
+
|
| 71 |
+
| Variable | Purpose |
|
| 72 |
+
|----------|---------|
|
| 73 |
+
| `RLX_KITTENTTS_DIR` | Model directory (default: `.cache/kittentts-mini-0.8`) |
|
| 74 |
+
| `RLX_ONNX_BUNDLE` | Bundle directory if not co-located with weights |
|
| 75 |
+
| `KITTEN_RLX_WEIGHTS` | Directory containing `model.safetensors` |
|
| 76 |
+
| `KITTEN_RLX_BUNDLE` | Legacy alias for `RLX_ONNX_BUNDLE` |
|
| 77 |
+
|
| 78 |
+
## Re-export
|
| 79 |
+
|
| 80 |
+
From [MIT-RLX/rlx-models](https://github.com/MIT-RLX/rlx-models):
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
just fetch-kittentts
|
| 84 |
+
just export-kitten-rlx-bundle
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
Requires: `pip install onnx onnxshape numpy safetensors`
|
| 88 |
+
|
| 89 |
+
## Crates
|
| 90 |
+
|
| 91 |
+
| Crate | Role |
|
| 92 |
+
|-------|------|
|
| 93 |
+
| [`kitten_tts_mini_rlx`](https://crates.io/crates/kitten_tts_mini_rlx) | Bundle → HIR → compile |
|
| 94 |
+
| [`rlx-kittentts`](https://crates.io/crates/rlx-kittentts) | CLI + library (`--features native`) |
|
| 95 |
+
|
| 96 |
+
## Inputs / outputs
|
| 97 |
+
|
| 98 |
+
| Tensor | Shape | dtype |
|
| 99 |
+
|--------|-------|-------|
|
| 100 |
+
| `input_ids` | `[1, sequence_length]` | i64 |
|
| 101 |
+
| `style` | `[1, 256]` | f32 |
|
| 102 |
+
| `speed` | `[1]` | f32 |
|
| 103 |
+
| `waveform` | `[num_samples]` | f32 (output) |
|
| 104 |
+
| `duration` | dynamic | i64 (output) |
|
| 105 |
+
|
| 106 |
+
## License
|
| 107 |
+
|
| 108 |
+
Derived from [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8) — follow the upstream model license. RLX tooling ([rlx-models](https://github.com/MIT-RLX/rlx-models)) is GPL-3.0.
|
graph.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
manifest.json
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_onnx": "KittenML/kitten-tts-mini-0.8:kitten_tts_mini_v0_8.onnx",
|
| 3 |
+
"opset": [
|
| 4 |
+
[
|
| 5 |
+
"",
|
| 6 |
+
20
|
| 7 |
+
],
|
| 8 |
+
[
|
| 9 |
+
"ai.onnx.ml",
|
| 10 |
+
5
|
| 11 |
+
],
|
| 12 |
+
[
|
| 13 |
+
"ai.onnx.training",
|
| 14 |
+
1
|
| 15 |
+
],
|
| 16 |
+
[
|
| 17 |
+
"ai.onnx.preview.training",
|
| 18 |
+
1
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
"com.microsoft",
|
| 22 |
+
1
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
"com.microsoft.experimental",
|
| 26 |
+
1
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
"com.microsoft.nchwc",
|
| 30 |
+
1
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
"org.pytorch.aten",
|
| 34 |
+
1
|
| 35 |
+
]
|
| 36 |
+
],
|
| 37 |
+
"inputs": [
|
| 38 |
+
{
|
| 39 |
+
"name": "input_ids",
|
| 40 |
+
"shape": [
|
| 41 |
+
1,
|
| 42 |
+
"sequence_length"
|
| 43 |
+
],
|
| 44 |
+
"dtype": "i64"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name": "style",
|
| 48 |
+
"shape": [
|
| 49 |
+
1,
|
| 50 |
+
256
|
| 51 |
+
],
|
| 52 |
+
"dtype": "f32"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name": "speed",
|
| 56 |
+
"shape": [
|
| 57 |
+
1
|
| 58 |
+
],
|
| 59 |
+
"dtype": "f32"
|
| 60 |
+
}
|
| 61 |
+
],
|
| 62 |
+
"outputs": [
|
| 63 |
+
{
|
| 64 |
+
"name": "waveform",
|
| 65 |
+
"shape": [
|
| 66 |
+
"num_samples"
|
| 67 |
+
],
|
| 68 |
+
"dtype": "f32"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "duration",
|
| 72 |
+
"shape": [
|
| 73 |
+
"Castduration_dim_0"
|
| 74 |
+
],
|
| 75 |
+
"dtype": "i64"
|
| 76 |
+
}
|
| 77 |
+
],
|
| 78 |
+
"node_count": 3006,
|
| 79 |
+
"initializer_count": 1140,
|
| 80 |
+
"op_histogram": {
|
| 81 |
+
"SequenceEmpty": 1,
|
| 82 |
+
"Shape": 88,
|
| 83 |
+
"Gather": 148,
|
| 84 |
+
"Cast": 251,
|
| 85 |
+
"Reshape": 192,
|
| 86 |
+
"Slice": 144,
|
| 87 |
+
"Transpose": 91,
|
| 88 |
+
"DynamicQuantizeLinear": 125,
|
| 89 |
+
"Squeeze": 4,
|
| 90 |
+
"Range": 7,
|
| 91 |
+
"Unsqueeze": 131,
|
| 92 |
+
"Mul": 637,
|
| 93 |
+
"MatMul": 163,
|
| 94 |
+
"Concat": 77,
|
| 95 |
+
"ConstantOfShape": 14,
|
| 96 |
+
"Equal": 12,
|
| 97 |
+
"Add": 467,
|
| 98 |
+
"Where": 22,
|
| 99 |
+
"ReduceMax": 1,
|
| 100 |
+
"Loop": 1,
|
| 101 |
+
"Expand": 15,
|
| 102 |
+
"ConcatFromSequence": 1,
|
| 103 |
+
"TopK": 1,
|
| 104 |
+
"ReduceProd": 1,
|
| 105 |
+
"LayerNormalization": 31,
|
| 106 |
+
"ScatterElements": 1,
|
| 107 |
+
"Greater": 3,
|
| 108 |
+
"Not": 1,
|
| 109 |
+
"ConvInteger": 74,
|
| 110 |
+
"ScatterND": 3,
|
| 111 |
+
"LeakyRelu": 28,
|
| 112 |
+
"Sub": 5,
|
| 113 |
+
"Sqrt": 25,
|
| 114 |
+
"Div": 30,
|
| 115 |
+
"Softmax": 12,
|
| 116 |
+
"Pow": 50,
|
| 117 |
+
"DynamicQuantizeLSTM": 6,
|
| 118 |
+
"Tanh": 13,
|
| 119 |
+
"InstanceNormalization": 55,
|
| 120 |
+
"Sigmoid": 1,
|
| 121 |
+
"ReduceSum": 1,
|
| 122 |
+
"Round": 1,
|
| 123 |
+
"Clip": 1,
|
| 124 |
+
"SplitToSequence": 2,
|
| 125 |
+
"Resize": 6,
|
| 126 |
+
"ConvTranspose": 7,
|
| 127 |
+
"If": 2,
|
| 128 |
+
"Conv": 4,
|
| 129 |
+
"Floor": 1,
|
| 130 |
+
"RandomUniformLike": 1,
|
| 131 |
+
"CumSum": 1,
|
| 132 |
+
"Sin": 39,
|
| 133 |
+
"RandomNormalLike": 1,
|
| 134 |
+
"Pad": 2,
|
| 135 |
+
"Less": 1,
|
| 136 |
+
"Atan": 1,
|
| 137 |
+
"And": 1,
|
| 138 |
+
"Exp": 1,
|
| 139 |
+
"Cos": 1
|
| 140 |
+
}
|
| 141 |
+
}
|
weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9a49eda8e7cbcd24b96f4ad18fe5028a00f26b9f204a67abc9a9a220bbb6c15
|
| 3 |
+
size 366599892
|