Spaces:
Running
Running
futurespyhi
commited on
Commit
·
95bb127
1
Parent(s):
06059a8
Set environment variable to skip LFS files during clone
Browse files- download_models.py +7 -2
download_models.py
CHANGED
|
@@ -34,11 +34,16 @@ def download_xcodec_models():
|
|
| 34 |
try:
|
| 35 |
# Step 1: Clone repository structure without LFS files
|
| 36 |
print("🔄 Step 1: Cloning repository structure (no LFS)...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
subprocess.run([
|
| 38 |
-
"git", "clone",
|
| 39 |
"https://huggingface.co/m-a-p/xcodec_mini_infer",
|
| 40 |
"xcodec_mini_infer"
|
| 41 |
-
], check=True, capture_output=True, text=True, timeout=300)
|
| 42 |
|
| 43 |
print("✅ Repository structure downloaded successfully")
|
| 44 |
|
|
|
|
| 34 |
try:
|
| 35 |
# Step 1: Clone repository structure without LFS files
|
| 36 |
print("🔄 Step 1: Cloning repository structure (no LFS)...")
|
| 37 |
+
|
| 38 |
+
# Set environment variable to skip LFS files during clone
|
| 39 |
+
env = os.environ.copy()
|
| 40 |
+
env["GIT_LFS_SKIP_SMUDGE"] = "1"
|
| 41 |
+
|
| 42 |
subprocess.run([
|
| 43 |
+
"git", "clone",
|
| 44 |
"https://huggingface.co/m-a-p/xcodec_mini_infer",
|
| 45 |
"xcodec_mini_infer"
|
| 46 |
+
], check=True, capture_output=True, text=True, timeout=300, env=env)
|
| 47 |
|
| 48 |
print("✅ Repository structure downloaded successfully")
|
| 49 |
|