Spaces:
Running
Running
futurespyhi
commited on
Commit
·
71096e3
1
Parent(s):
9e45d3b
reconfig specific lfs models
Browse files- download_models.py +14 -7
download_models.py
CHANGED
|
@@ -45,31 +45,38 @@ def download_xcodec_models():
|
|
| 45 |
"xcodec_mini_infer"
|
| 46 |
], check=True, capture_output=True, text=True, timeout=300, env=env)
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
print("✅ Repository structure downloaded successfully")
|
| 49 |
|
| 50 |
# Step 2: Download critical LFS files using wget
|
| 51 |
print("🔄 Step 2: Downloading critical LFS files with wget...")
|
| 52 |
|
| 53 |
-
# Define critical LFS files and their download URLs
|
| 54 |
lfs_files = [
|
| 55 |
{
|
| 56 |
"path": "decoders/decoder_131000.pth",
|
| 57 |
-
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/
|
| 58 |
-
"description": "Vocal decoder model (
|
| 59 |
},
|
| 60 |
{
|
| 61 |
"path": "decoders/decoder_151000.pth",
|
| 62 |
-
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/
|
| 63 |
-
"description": "Instrumental decoder model (
|
| 64 |
},
|
| 65 |
{
|
| 66 |
"path": "final_ckpt/ckpt_00360000.pth",
|
| 67 |
-
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/
|
| 68 |
"description": "Main checkpoint (1.3GB)"
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"path": "semantic_ckpts/hf_1_325000/pytorch_model.bin",
|
| 72 |
-
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/
|
| 73 |
"description": "Semantic model (361MB)"
|
| 74 |
}
|
| 75 |
]
|
|
|
|
| 45 |
"xcodec_mini_infer"
|
| 46 |
], check=True, capture_output=True, text=True, timeout=300, env=env)
|
| 47 |
|
| 48 |
+
# Checkout specific commit to ensure version consistency
|
| 49 |
+
os.chdir("xcodec_mini_infer")
|
| 50 |
+
subprocess.run([
|
| 51 |
+
"git", "checkout", "fe781a6"
|
| 52 |
+
], check=True, capture_output=True, text=True, timeout=60)
|
| 53 |
+
os.chdir("..")
|
| 54 |
+
|
| 55 |
print("✅ Repository structure downloaded successfully")
|
| 56 |
|
| 57 |
# Step 2: Download critical LFS files using wget
|
| 58 |
print("🔄 Step 2: Downloading critical LFS files with wget...")
|
| 59 |
|
| 60 |
+
# Define critical LFS files and their download URLs using fixed commit fe781a6
|
| 61 |
lfs_files = [
|
| 62 |
{
|
| 63 |
"path": "decoders/decoder_131000.pth",
|
| 64 |
+
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/fe781a6/decoders/decoder_131000.pth",
|
| 65 |
+
"description": "Vocal decoder model (72.6MB)"
|
| 66 |
},
|
| 67 |
{
|
| 68 |
"path": "decoders/decoder_151000.pth",
|
| 69 |
+
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/fe781a6/decoders/decoder_151000.pth",
|
| 70 |
+
"description": "Instrumental decoder model (72.6MB)"
|
| 71 |
},
|
| 72 |
{
|
| 73 |
"path": "final_ckpt/ckpt_00360000.pth",
|
| 74 |
+
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/fe781a6/final_ckpt/ckpt_00360000.pth",
|
| 75 |
"description": "Main checkpoint (1.3GB)"
|
| 76 |
},
|
| 77 |
{
|
| 78 |
"path": "semantic_ckpts/hf_1_325000/pytorch_model.bin",
|
| 79 |
+
"url": "https://huggingface.co/m-a-p/xcodec_mini_infer/resolve/fe781a6/semantic_ckpts/hf_1_325000/pytorch_model.bin",
|
| 80 |
"description": "Semantic model (361MB)"
|
| 81 |
}
|
| 82 |
]
|