Instructions to use mlboydaisuke/Dia2-1B-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use mlboydaisuke/Dia2-1B-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Moshi
How to use mlboydaisuke/Dia2-1B-LiteRT with Moshi:
# pip install moshi # Run the interactive web server python -m moshi.server --hf-repo "mlboydaisuke/Dia2-1B-LiteRT" # 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("mlboydaisuke/Dia2-1B-LiteRT") # 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) - Dia2
How to use mlboydaisuke/Dia2-1B-LiteRT with Dia2:
from dia2 import Dia2, GenerationConfig, SamplingConfig dia = Dia2.from_repo("mlboydaisuke/Dia2-1B-LiteRT", device="cuda", dtype="bfloat16") config = GenerationConfig( cfg_scale=2.0, audio=SamplingConfig(temperature=0.8, top_k=50), use_cuda_graph=True, ) result = dia.generate("[S1] Hello Dia2!", config=config, output_wav="hello.wav", verbose=True) - Notebooks
- Google Colab
- Kaggle
Link the card back to its collection and the request box
Browse files
README.md
CHANGED
|
@@ -167,3 +167,11 @@ the device:
|
|
| 167 |
|
| 168 |
Apache-2.0, inherited from [nari-labs/Dia2-1B](https://huggingface.co/nari-labs/Dia2-1B). The Mimi
|
| 169 |
codec graphs derive from [kyutai/mimi](https://huggingface.co/kyutai/mimi) (CC-BY-4.0).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
Apache-2.0, inherited from [nari-labs/Dia2-1B](https://huggingface.co/nari-labs/Dia2-1B). The Mimi
|
| 169 |
codec graphs derive from [kyutai/mimi](https://huggingface.co/kyutai/mimi) (CC-BY-4.0).
|
| 170 |
+
|
| 171 |
+
<!-- funnel:v1 -->
|
| 172 |
+
|
| 173 |
+
---
|
| 174 |
+
|
| 175 |
+
**Want a different model on-device?** [Open a request](https://github.com/john-rocky/on-device-requests) — free, open weights only; the export and its measured numbers get published publicly.
|
| 176 |
+
|
| 177 |
+
<!-- /funnel:v1 -->
|