Dia2-2B / README.md
NariLabs's picture
Add Dia2-2B inference bundle
999a7fa verified
|
raw
history blame
926 Bytes

Dia2 2B (new_dia)

This repo holds the inference assets for the Dia2 2B voice model:

  • config.json: minimal runtime config consumed by new_dia.config.load_config.
  • model.safetensors: FP32 weights in the bias-free linear layout.
  • Tokenizer bundle (tokenizer.json, tokenizer_config.json, special_tokens_map.json, vocab.json, merges.txt, added_tokens.json).

Usage

pip install -U torch transformers safetensors huggingface_hub
uv run -m new_dia.cli \
  --config nari-labs/Dia2-2B --weights nari-labs/Dia2-2B \
  --out output.wav --cfg 2.0 --temperature 0.8 --dtype bfloat16

Or via Python:

from new_dia.runtime.generator import TextToSpeechGenerator
runtime = TextToSpeechGenerator.from_paths(
    config_path="nari-labs/Dia2-2B",
    weights_path="nari-labs/Dia2-2B",
    device="cuda",
    dtype="bfloat16",
)

Mimi codec weights are fetched from kyutai/mimi at runtime.