fix: install torchvision from CUDA index to prevent ABI mismatch
timm and ultralytics depend on torchvision. When pip install -r requirements.txt resolves them, it pulls torchvision from PyPI (CPU build) which is incompatible with CUDA torch, causing "operator torchvision::nms does not exist" at import time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -30,11 +30,11 @@ if ($LASTEXITCODE -eq 0) {
|
||||
$hasNvidia = Get-Command nvidia-smi -ErrorAction SilentlyContinue
|
||||
if ($hasNvidia) {
|
||||
Write-Host "`nNVIDIA GPU detected — installing PyTorch with CUDA 12.8..." -ForegroundColor Green
|
||||
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128
|
||||
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu128
|
||||
} else {
|
||||
Write-Host "`nNo NVIDIA GPU detected — installing CPU-only PyTorch..." -ForegroundColor Yellow
|
||||
Write-Host "(Audio scanning will work but will be slower without GPU)" -ForegroundColor Yellow
|
||||
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cpu
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user