eugenehp commited on
Commit
672f12e
Β·
verified Β·
1 Parent(s): a24d633

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +32 -20
  2. tiny-tts.rlxp +2 -2
README.md CHANGED
@@ -37,11 +37,11 @@ just fetch-tiny-tts && cargo run -p rlx-tiny-tts --release --features apple-sili
37
 
38
  ## Contents
39
 
40
- Either use `tiny-tts.rlxp` (official RLXPFLAT asset pack) or the ONNX + `frontend/` tree. Also used by `rlx-melotts`.
41
 
42
  ## Pack layout (`.rlxp`)
43
 
44
- Asset-only pack (no weight tensors in the TOC): VITS2 ONNX subgraphs plus English frontend (G2P, BERT tokenizer, CMUdict). `rlx-tiny-tts` / `rlx-melotts` materialize sidecars then run the ONNX graphs.
45
 
46
  Official RLX package format (`RLXPFLAT`, container v2).
47
 
@@ -72,14 +72,14 @@ directly (or materialize sidecars to a temp dir for asset-only packs).
72
 
73
  ### Sidecars (file assets)
74
 
75
- Entire runtime tree is stored as cold zstd sidecars.
76
 
77
  Paths below are logical ids inside the pack (`__flat__/sidecar/<id>`).
78
  Cold sidecars are zstd-compressed; sizes show raw β†’ stored.
79
 
80
  | Sidecar | Raw | Stored | Role |
81
  |---|---:|---:|---|
82
- | `config.json` | 325 B | 220 B | Model / sample-rate config |
83
  | `frontend/bert/tokenizer.json` | 694.7 KiB | 214.5 KiB | BERT WordPiece tokenizer |
84
  | `frontend/bert/tokenizer_config.json` | 351 B | 218 B | Tokenizer config |
85
  | `frontend/cmudict_rep.txt` | 3.9 MiB | 1.0 MiB | CMUdict repair / variants |
@@ -88,36 +88,48 @@ Cold sidecars are zstd-compressed; sizes show raw β†’ stored.
88
  | `frontend/homographs.en` | 18.3 KiB | 5.0 KiB | Homograph list |
89
  | `frontend/perceptron_tagger.json` | 5.4 MiB | 1.5 MiB | POS tagger |
90
  | `frontend/symbols.json` | 2.1 KiB | 726 B | Symbol table |
91
- | `onnx/decoder.onnx` | 13.8 MiB | 12.5 MiB | VITS2 decoder |
92
- | `onnx/duration_predictor.onnx` | 1.0 MiB | 598.4 KiB | Duration predictor |
93
- | `onnx/flow.onnx` | 14.2 MiB | 7.9 MiB | Flow / posterior |
94
- | `onnx/text_encoder.onnx` | 3.0 MiB | 1.7 MiB | Text encoder |
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  ### Logical tree
97
 
98
  ```text
99
  tiny-tts.rlxp
100
- └── sidecars/
101
- β”œβ”€β”€ config.json
102
- β”œβ”€β”€ onnx/
103
- β”‚ β”œβ”€β”€ text_encoder.onnx
104
- β”‚ β”œβ”€β”€ duration_predictor.onnx
105
- β”‚ β”œβ”€β”€ flow.onnx
106
- β”‚ └── decoder.onnx
107
- └── frontend/
108
- β”œβ”€β”€ bert/tokenizer*.json
109
- β”œβ”€β”€ g2p_*.{safetensors,txt}
110
- └── symbols / tagger / homographs
111
  ```
112
 
113
  ### How it is packed
114
 
115
- `just export-tiny-tts-rlxp` β†’ `rlx-assets` `write_dir_rlxp` over `weights/tts/tiny-tts-rlx` (ONNX + frontend tree).
116
 
117
  ## Note
118
 
119
  MeloTTS (`rlx-melotts`) loads this same bundle β€” locally `weights/tts/melotts` is a symlink.
120
 
 
 
 
 
121
  ## Run with RLX
122
 
123
  Clone [rlx-models](https://github.com/MIT-RLX/rlx-models), place this repo under `weights/tts/tiny-tts-rlx` (or pass the path explicitly), then:
 
37
 
38
  ## Contents
39
 
40
+ Either use `tiny-tts.rlxp` (native nested graph packs + frontend) or a local ONNX pack source. Also used by `rlx-melotts`. Runtime does **not** load `.onnx` from Hub.
41
 
42
  ## Pack layout (`.rlxp`)
43
 
44
+ Outer RLXPFLAT bundle: nested native subgraph packs under `graphs/` (hot weight tensors + graph IR sidecars) plus English frontend assets. No `.onnx` on Hub. `rlx-tiny-tts` materializes the outer pack, then lowers each nested pack to HIR for the utterance length.
45
 
46
  Official RLX package format (`RLXPFLAT`, container v2).
47
 
 
72
 
73
  ### Sidecars (file assets)
74
 
75
+ Outer TOC is file sidecars only. Neural weights live **inside** each `graphs/<name>.rlxp` as hot mmap tensors (not safetensors).
76
 
77
  Paths below are logical ids inside the pack (`__flat__/sidecar/<id>`).
78
  Cold sidecars are zstd-compressed; sizes show raw β†’ stored.
79
 
80
  | Sidecar | Raw | Stored | Role |
81
  |---|---:|---:|---|
82
+ | `config.json` | 325 B | 220 B | Model / sample-rate config (44.1 kHz) |
83
  | `frontend/bert/tokenizer.json` | 694.7 KiB | 214.5 KiB | BERT WordPiece tokenizer |
84
  | `frontend/bert/tokenizer_config.json` | 351 B | 218 B | Tokenizer config |
85
  | `frontend/cmudict_rep.txt` | 3.9 MiB | 1.0 MiB | CMUdict repair / variants |
 
88
  | `frontend/homographs.en` | 18.3 KiB | 5.0 KiB | Homograph list |
89
  | `frontend/perceptron_tagger.json` | 5.4 MiB | 1.5 MiB | POS tagger |
90
  | `frontend/symbols.json` | 2.1 KiB | 726 B | Symbol table |
91
+ | `graphs/decoder.rlxp` | 13.7 MiB | 12.5 MiB | Nested pack: hot tensors + graph.json |
92
+ | `graphs/duration_predictor.rlxp` | 1.0 MiB | 598.8 KiB | Nested pack: hot tensors + graph.json |
93
+ | `graphs/flow.rlxp` | 13.7 MiB | 8.0 MiB | Nested pack: hot tensors + graph.json |
94
+ | `graphs/text_encoder.rlxp` | 2.9 MiB | 1.7 MiB | Nested pack: hot tensors + graph.json |
95
+
96
+ ### Architecture
97
+
98
+ **Pipeline:** text β†’ English frontend (G2P) β†’ `text_encoder` β†’ `duration_predictor` β†’ monotonic alignment + latent sample (Rust) β†’ `flow` β†’ `decoder` β†’ 44.1 kHz mono WAV.
99
+
100
+ | Module | Role | Typical dtype | Notes |
101
+ |---|---|---|---|
102
+ | `text_encoder` | phone/tone/lang β†’ latent | f32 | length = phoneme count `T` |
103
+ | `duration_predictor` | per-phone duration | f32 | |
104
+ | `flow` | prior / flow | f32 | |
105
+ | `decoder` | HiFi-GAN-style vocoder | f32 | ConvTranspose upsample Γ—512 |
106
+ | frontend | G2P + BERT tokenizer + CMUdict | β€” | file sidecars |
107
 
108
  ### Logical tree
109
 
110
  ```text
111
  tiny-tts.rlxp
112
+ β”œβ”€β”€ graphs/
113
+ β”‚ β”œβ”€β”€ text_encoder.rlxp # hot f32/i64 + graph.json
114
+ β”‚ β”œβ”€β”€ duration_predictor.rlxp
115
+ β”‚ β”œβ”€β”€ flow.rlxp
116
+ β”‚ └── decoder.rlxp
117
+ β”œβ”€β”€ config.json
118
+ └── frontend/ # G2P / tokenizer (not neural)
 
 
 
 
119
  ```
120
 
121
  ### How it is packed
122
 
123
+ `just export-tiny-tts-rlxp` / `pack_rlxp` example: ONNX pack-time source β†’ nested `graphs/*.rlxp` via `rlx-assets` native-pack, then outer bundle. Hub artifact has zero `.onnx`.
124
 
125
  ## Note
126
 
127
  MeloTTS (`rlx-melotts`) loads this same bundle β€” locally `weights/tts/melotts` is a symlink.
128
 
129
+ ## Note
130
+
131
+ Hub ships **no ONNX**. Nested `graphs/*.rlxp` hold hot f32/i64 tensors + `graph.json`; the crate lowers to HIR per utterance length.
132
+
133
  ## Run with RLX
134
 
135
  Clone [rlx-models](https://github.com/MIT-RLX/rlx-models), place this repo under `weights/tts/tiny-tts-rlx` (or pass the path explicitly), then:
tiny-tts.rlxp CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:90627cd76af165a9707d368edab801aa91d654dc7c644267702ce37550f837db
3
- size 30811106
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a8c8ea4b10be5d5fb960e5c8e8ebcbc61c8c32e3fbf9f094ec3d2b22d066e73
3
+ size 30835846