CDOM201 commited on
Commit
bc7447c
·
verified ·
1 Parent(s): 75920eb

Downloading from snapshot

Browse files
Files changed (2) hide show
  1. download_model.py +7 -9
  2. requirements.txt +1 -0
download_model.py CHANGED
@@ -1,11 +1,9 @@
1
- import torch
2
- import functools
3
- from chatterbox.mtl_tts import ChatterboxMultilingualTTS
4
 
5
- # Patch torch.load to force CPU mapping during build time
6
- torch.load = functools.partial(torch.load, map_location='cpu')
7
-
8
- print("Downloading model...")
9
- # Download weights to cache during build time
10
- ChatterboxMultilingualTTS.from_pretrained(device="cpu")
11
  print("Model downloaded successfully.")
 
1
+ from huggingface_hub import snapshot_download
 
 
2
 
3
+ print("Downloading model weights (cache only)...")
4
+ # The correct repository for chatterbox-tts
5
+ snapshot_download(
6
+ repo_id="ResembleAI/chatterbox",
7
+ allow_patterns=["ve.pt", "t3_mtl23ls_v2.safetensors", "s3gen.pt", "grapheme_mtl_merged_expanded_v1.json", "conds.pt", "Cangjie5_TC.json"]
8
+ )
9
  print("Model downloaded successfully.")
requirements.txt CHANGED
@@ -2,6 +2,7 @@ fastapi==0.127.0
2
  uvicorn==0.40.0
3
  pydantic==2.11.10
4
  chatterbox-tts==0.1.6
 
5
  python-multipart==0.0.21
6
  numpy==1.25.2
7
  scipy==1.16.3
 
2
  uvicorn==0.40.0
3
  pydantic==2.11.10
4
  chatterbox-tts==0.1.6
5
+ peft
6
  python-multipart==0.0.21
7
  numpy==1.25.2
8
  scipy==1.16.3