Instructions to use yapwithai/kyutai-tts-1.6b-en_fr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Moshi
How to use yapwithai/kyutai-tts-1.6b-en_fr with Moshi:
# pip install moshi # Run the interactive web server python -m moshi.server --hf-repo "yapwithai/kyutai-tts-1.6b-en_fr" # Then open https://localhost:8998 in your browser
# pip install moshi import torch from moshi.models import loaders # Load checkpoint info from HuggingFace checkpoint = loaders.CheckpointInfo.from_hf_repo("yapwithai/kyutai-tts-1.6b-en_fr") # Load the Mimi audio codec mimi = checkpoint.get_mimi(device="cuda") mimi.set_num_codebooks(8) # Encode audio (24kHz, mono) wav = torch.randn(1, 1, 24000 * 10) # [batch, channels, samples] with torch.no_grad(): codes = mimi.encode(wav.cuda()) decoded = mimi.decode(codes) - Notebooks
- Google Colab
- Kaggle
Upload config.json with huggingface_hub
Browse files- config.json +161 -0
config.json
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
+
"num_heads": 16,
|
| 44 |
+
"num_layers": 16,
|
| 45 |
+
"hidden_scale": 4.125,
|
| 46 |
+
"causal": true,
|
| 47 |
+
"layer_scale": null,
|
| 48 |
+
"context": 500,
|
| 49 |
+
"max_period": 10000,
|
| 50 |
+
"gating": "silu",
|
| 51 |
+
"norm": "rms_norm_f32",
|
| 52 |
+
"positional_embedding": "rope",
|
| 53 |
+
"depformer_dim": 1024,
|
| 54 |
+
"depformer_num_heads": 16,
|
| 55 |
+
"depformer_num_layers": 4,
|
| 56 |
+
"depformer_dim_feedforward": 3072,
|
| 57 |
+
"depformer_multi_linear": true,
|
| 58 |
+
"depformer_pos_emb": "none",
|
| 59 |
+
"depformer_weights_per_step": true,
|
| 60 |
+
"depformer_low_rank_embeddings": 128,
|
| 61 |
+
"demux_second_stream": true,
|
| 62 |
+
"text_card_out": null,
|
| 63 |
+
"conditioners": {
|
| 64 |
+
"speaker_wavs": {
|
| 65 |
+
"type": "tensor",
|
| 66 |
+
"tensor": {
|
| 67 |
+
"dim": 512
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
"cfg": {
|
| 71 |
+
"type": "lut",
|
| 72 |
+
"lut": {
|
| 73 |
+
"n_bins": 7,
|
| 74 |
+
"dim": 16,
|
| 75 |
+
"tokenizer": "noop",
|
| 76 |
+
"possible_values": [
|
| 77 |
+
"1.0",
|
| 78 |
+
"1.5",
|
| 79 |
+
"2.0",
|
| 80 |
+
"2.5",
|
| 81 |
+
"3.0",
|
| 82 |
+
"3.5",
|
| 83 |
+
"4.0"
|
| 84 |
+
]
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"control": {
|
| 88 |
+
"type": "lut",
|
| 89 |
+
"lut": {
|
| 90 |
+
"dim": 2048,
|
| 91 |
+
"n_bins": 1,
|
| 92 |
+
"tokenizer": "noop",
|
| 93 |
+
"possible_values": [
|
| 94 |
+
"ok"
|
| 95 |
+
]
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
"fuser": {
|
| 100 |
+
"cross_attention_pos_emb": true,
|
| 101 |
+
"cross_attention_pos_emb_scale": 1,
|
| 102 |
+
"sum": [
|
| 103 |
+
"control"
|
| 104 |
+
],
|
| 105 |
+
"prepend": [],
|
| 106 |
+
"cross": [
|
| 107 |
+
"speaker_wavs"
|
| 108 |
+
]
|
| 109 |
+
},
|
| 110 |
+
"cross_attention": true,
|
| 111 |
+
"tts_config": {
|
| 112 |
+
"audio_delay": 1.28,
|
| 113 |
+
"second_stream_ahead": 2
|
| 114 |
+
},
|
| 115 |
+
"model_id": {
|
| 116 |
+
"sig": "1e68beda",
|
| 117 |
+
"epoch": 240
|
| 118 |
+
},
|
| 119 |
+
"depformer_weights_per_step_schedule": [
|
| 120 |
+
0,
|
| 121 |
+
1,
|
| 122 |
+
2,
|
| 123 |
+
3,
|
| 124 |
+
4,
|
| 125 |
+
5,
|
| 126 |
+
6,
|
| 127 |
+
7,
|
| 128 |
+
8,
|
| 129 |
+
8,
|
| 130 |
+
8,
|
| 131 |
+
8,
|
| 132 |
+
8,
|
| 133 |
+
8,
|
| 134 |
+
8,
|
| 135 |
+
8,
|
| 136 |
+
9,
|
| 137 |
+
9,
|
| 138 |
+
9,
|
| 139 |
+
9,
|
| 140 |
+
9,
|
| 141 |
+
9,
|
| 142 |
+
9,
|
| 143 |
+
9,
|
| 144 |
+
10,
|
| 145 |
+
10,
|
| 146 |
+
10,
|
| 147 |
+
10,
|
| 148 |
+
10,
|
| 149 |
+
10,
|
| 150 |
+
10,
|
| 151 |
+
10
|
| 152 |
+
],
|
| 153 |
+
"model_type": "tts",
|
| 154 |
+
"lm_gen_config": {
|
| 155 |
+
"temp": 0.6,
|
| 156 |
+
"text_temp": 0.6
|
| 157 |
+
},
|
| 158 |
+
"tokenizer_name": "tokenizer_spm_8k_en_fr_audio.model",
|
| 159 |
+
"mimi_name": "tokenizer-e351c8d8-checkpoint125.safetensors",
|
| 160 |
+
"moshi_name": "dsm_tts_1e68beda@240.safetensors"
|
| 161 |
+
}
|