Text-to-Speech
ONNX
GGUF
Chinese
English
onnxruntime
tts
on-device
jetson
telephony
vits
mb-istft-vits
multi-speaker
mandarin
taiwanese-mandarin
imatrix
conversational
Instructions to use Luigi/PrimeTTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Luigi/PrimeTTS with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: llama cli -hf Luigi/PrimeTTS:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: llama cli -hf Luigi/PrimeTTS:F32
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: ./llama-cli -hf Luigi/PrimeTTS:F32
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Luigi/PrimeTTS:F32
Use Docker
docker model run hf.co/Luigi/PrimeTTS:F32
- LM Studio
- Jan
- Ollama
How to use Luigi/PrimeTTS with Ollama:
ollama run hf.co/Luigi/PrimeTTS:F32
- Unsloth Studio
How to use Luigi/PrimeTTS with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/PrimeTTS to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/PrimeTTS to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Luigi/PrimeTTS to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Luigi/PrimeTTS with Docker Model Runner:
docker model run hf.co/Luigi/PrimeTTS:F32
- Lemonade
How to use Luigi/PrimeTTS with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Luigi/PrimeTTS:F32
Run and chat with the model
lemonade run user.PrimeTTS-F32
List all available models
lemonade list
export: disable non-ONNX group planner
Browse files- scripts/export_8k.py +9 -2
scripts/export_8k.py
CHANGED
|
@@ -34,7 +34,8 @@ class DecoderHead(torch.nn.Module):
|
|
| 34 |
x = frames + m.frame_proj(frame_meta) + m.local_ctx(local_ctx_raw)
|
| 35 |
x = x + m.abs_frame(abs_pos)
|
| 36 |
if m.cfg.use_frame_pitch:
|
| 37 |
-
|
|
|
|
| 38 |
for blk in m.decoder:
|
| 39 |
x = blk(x, frame_mask)
|
| 40 |
x = x + m.frame_gru(x)[0]
|
|
@@ -73,7 +74,13 @@ def main():
|
|
| 73 |
|
| 74 |
ac = torch.load(args.acoustic_ckpt, map_location=dev, weights_only=False)
|
| 75 |
cfg = MicroFastSpeechConfig(**ac["config"])
|
| 76 |
-
m = MicroFastSpeech(cfg); m.load_state_dict(ac["model"]); m.eval()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
enc, dec = EncoderHead(m).eval(), DecoderHead(m).eval()
|
| 78 |
print(f"acoustic: sr={cfg.sample_rate} vocab={cfg.vocab_size} tone={cfg.tone_size} lang={cfg.lang_size} "
|
| 79 |
f"abs_bins={cfg.abs_frame_bins} max_frames={cfg.max_frames}")
|
|
|
|
| 34 |
x = frames + m.frame_proj(frame_meta) + m.local_ctx(local_ctx_raw)
|
| 35 |
x = x + m.abs_frame(abs_pos)
|
| 36 |
if m.cfg.use_frame_pitch:
|
| 37 |
+
refined = m.refine_frame_pitch(frames, frame_meta, pitch_frame)
|
| 38 |
+
x = x + m.pitch_proj(refined)
|
| 39 |
for blk in m.decoder:
|
| 40 |
x = blk(x, frame_mask)
|
| 41 |
x = x + m.frame_gru(x)[0]
|
|
|
|
| 74 |
|
| 75 |
ac = torch.load(args.acoustic_ckpt, map_location=dev, weights_only=False)
|
| 76 |
cfg = MicroFastSpeechConfig(**ac["config"])
|
| 77 |
+
m = MicroFastSpeech(cfg); m.load_state_dict(ac["model"], strict=False); m.eval()
|
| 78 |
+
# The group-duration planner uses a non-ONNX-able host loop and only adjusts inference-time
|
| 79 |
+
# durations (the mel decoder is trained on GT durations). Disable it so the exported encoder's
|
| 80 |
+
# plain-duration path (which keeps the contextual duration-delta) matches m.infer() for parity.
|
| 81 |
+
if getattr(m, "group_duration_delta", None) is not None:
|
| 82 |
+
m.group_duration_delta = None
|
| 83 |
+
print("note: group_duration_planner disabled at export (host-loop; plain durations used)")
|
| 84 |
enc, dec = EncoderHead(m).eval(), DecoderHead(m).eval()
|
| 85 |
print(f"acoustic: sr={cfg.sample_rate} vocab={cfg.vocab_size} tone={cfg.tone_size} lang={cfg.lang_size} "
|
| 86 |
f"abs_bins={cfg.abs_frame_bins} max_frames={cfg.max_frames}")
|