Stylique commited on
Commit
9efd4e1
·
verified ·
1 Parent(s): 2bc2413

Upload 2 files

Browse files
Files changed (2) hide show
  1. post_install.py +24 -0
  2. requirements.txt +1 -0
post_install.py CHANGED
@@ -74,6 +74,11 @@ def install_torch_sparse():
74
  print("Will try to work with current PyTorch version and attempt alternative installation methods")
75
  PYTORCH_VERSION = pytorch_base
76
  CUDA_VERSION = cuda_version
 
 
 
 
 
77
  else:
78
  # Store version info for later use
79
  PYTORCH_VERSION = pytorch_base
@@ -385,6 +390,21 @@ def install_pytorch3d():
385
 
386
  return False
387
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  def install_fashion_clip():
389
  """Setup Fashion-CLIP"""
390
  print("Setting up Fashion-CLIP...")
@@ -431,6 +451,10 @@ def main():
431
  print("Failed to install Fashion-CLIP")
432
  sys.exit(1)
433
 
 
 
 
 
434
  # Final verification
435
  print("\n=== Final Verification ===")
436
  print("Checking all dependencies...")
 
74
  print("Will try to work with current PyTorch version and attempt alternative installation methods")
75
  PYTORCH_VERSION = pytorch_base
76
  CUDA_VERSION = cuda_version
77
+
78
+ # Install torchvision for the current PyTorch version
79
+ print("Installing torchvision for current PyTorch version...")
80
+ if not run_command("pip install torchvision"):
81
+ print("Warning: Failed to install torchvision")
82
  else:
83
  # Store version info for later use
84
  PYTORCH_VERSION = pytorch_base
 
390
 
391
  return False
392
 
393
+ def install_pytorch_dependencies():
394
+ """Install PyTorch-related dependencies"""
395
+ print("Installing PyTorch dependencies...")
396
+
397
+ # Install torchvision
398
+ if not run_command("pip install torchvision"):
399
+ print("Warning: Failed to install torchvision")
400
+ return False
401
+
402
+ # Install torchaudio if needed
403
+ if not run_command("pip install torchaudio"):
404
+ print("Warning: Failed to install torchaudio")
405
+
406
+ return True
407
+
408
  def install_fashion_clip():
409
  """Setup Fashion-CLIP"""
410
  print("Setting up Fashion-CLIP...")
 
451
  print("Failed to install Fashion-CLIP")
452
  sys.exit(1)
453
 
454
+ if not install_pytorch_dependencies():
455
+ print("Failed to install PyTorch dependencies")
456
+ sys.exit(1)
457
+
458
  # Final verification
459
  print("\n=== Final Verification ===")
460
  print("Checking all dependencies...")
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  # Core dependencies - PyTorch will be installed by post_install.py with correct CUDA version
 
2
  clip
3
  imageio
4
  cython
 
1
  # Core dependencies - PyTorch will be installed by post_install.py with correct CUDA version
2
+ torchvision
3
  clip
4
  imageio
5
  cython