Endy2001 commited on
Commit
8104e2a
·
verified ·
1 Parent(s): 291104d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +15 -10
README.md CHANGED
@@ -2,28 +2,33 @@
2
 
3
  This repository hosts the Vui 100M base checkpoint and Fluac tokenizer used by the `fluxions/vui` project.
4
 
5
- Files:
6
- - `vui-100m-base.pt`: Vui TTS checkpoint.
7
- - `fluac-22hz-22khz.pt`: Fluac tokenizer/checkpoint.
8
  - `LICENSE`: MIT license from the upstream project.
9
 
10
- ## Quick usage (PyTorch)
11
  ```python
12
  import torch
 
 
13
  from vui.model import Vui
14
 
15
- # Download checkpoint locally first (or place the HF path in `checkpoint_path`).
16
- model = Vui.from_pretrained_inf("vui-100m-base.pt")
17
- # If the file is not on disk, manually download from HF:
18
- # huggingface_hub.hf_hub_download("Endy2001/vui-tts", "vui-100m-base.pt")
 
 
19
 
20
  text = "Hello! This is Vui speaking from Hugging Face."
21
  with torch.inference_mode():
22
- audio = model.codec.decode(model.codec.encode(torch.randn(1, 1, 24000)))
 
23
  ```
24
 
25
  ## Notes
26
  - This is a TTS model with a custom architecture; it is **not** a standard CausalLM.
27
- - `vllm serve` currently only supports text-generation transformer architectures, so this checkpoint cannot be served directly via `vllm serve Endy2001/vui-tts`. Use the Python API above or the scripts in the upstream repo instead.
28
  - Upstream code: https://github.com/fluxions-ai/vui
29
  ```
 
2
 
3
  This repository hosts the Vui 100M base checkpoint and Fluac tokenizer used by the `fluxions/vui` project.
4
 
5
+ Contents:
6
+ - `vui-100m-base.pt`: Vui TTS checkpoint (100M parameters).
7
+ - `fluac-22hz-22khz.pt`: Fluac codec checkpoint.
8
  - `LICENSE`: MIT license from the upstream project.
9
 
10
+ ## Quick usage (Python)
11
  ```python
12
  import torch
13
+ from huggingface_hub import hf_hub_download
14
+ from vui.inference import render
15
  from vui.model import Vui
16
 
17
+ # Download checkpoints from this repo (returns local file paths)
18
+ ckpt = hf_hub_download("Endy2001/vui-tts", "vui-100m-base.pt")
19
+ codec_ckpt = hf_hub_download("Endy2001/vui-tts", "fluac-22hz-22khz.pt")
20
+
21
+ # Load model (pass codec checkpoint so it doesn't fetch from upstream)
22
+ model = Vui.from_pretrained_inf(ckpt, codec_checkpoint=codec_ckpt).to("cuda")
23
 
24
  text = "Hello! This is Vui speaking from Hugging Face."
25
  with torch.inference_mode():
26
+ audio = render(model, text)[0].cpu().numpy()
27
+ # `audio` is a mono waveform at 24 kHz
28
  ```
29
 
30
  ## Notes
31
  - This is a TTS model with a custom architecture; it is **not** a standard CausalLM.
32
+ - `vllm serve` only supports text-generation transformer architectures, so this checkpoint cannot be served directly via `vllm serve Endy2001/vui-tts`. Use the Python API above or the scripts in the upstream repo instead.
33
  - Upstream code: https://github.com/fluxions-ai/vui
34
  ```