futurespyhi commited on
Commit
95bb127
Β·
1 Parent(s): 06059a8

Set environment variable to skip LFS files during clone

Browse files
Files changed (1) hide show
  1. 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", "--no-lfs",
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