File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,14 +199,30 @@ REM Install PyTorch
199199echo [5/7] Installing PyTorch...
200200setlocal enabledelayedexpansion
201201
202- if " %CUDA_CHOICE% " == " 1" set CUDA_VER = cu130
203- if " %CUDA_CHOICE% " == " 2" set CUDA_VER = cu128
204- if " %CUDA_CHOICE% " == " 3" set CUDA_VER = cu121
202+ REM Version matrix: each CUDA version requires matching torch/torchaudio/torchvision
203+ if " %CUDA_CHOICE% " == " 1" (
204+ set CUDA_VER = cu130
205+ set TORCH_VER = 2.9.1
206+ set TORCHAUDIO_VER = 2.9.1
207+ set TORCHVISION_VER = 0.24.1
208+ )
209+ if " %CUDA_CHOICE% " == " 2" (
210+ set CUDA_VER = cu128
211+ set TORCH_VER = 2.9.1
212+ set TORCHAUDIO_VER = 2.9.1
213+ set TORCHVISION_VER = 0.24.1
214+ )
215+ if " %CUDA_CHOICE% " == " 3" (
216+ set CUDA_VER = cu121
217+ set TORCH_VER = 2.5.1
218+ set TORCHAUDIO_VER = 2.5.1
219+ set TORCHVISION_VER = 0.20.1
220+ )
205221
206222if defined CUDA_VER (
207- echo Installing PyTorch with !CUDA_VER! ...
223+ echo Installing PyTorch !TORCH_VER! with !CUDA_VER! ...
208224 echo This may take several minutes...
209- pip install torch== 2.9.1 torchaudio== 2.9.1 torchvision== 0.24.1 --index-url https://download.pytorch.org/whl/!CUDA_VER!
225+ pip install torch== !TORCH_VER! torchaudio== !TORCHAUDIO_VER! torchvision== !TORCHVISION_VER! --index-url https://download.pytorch.org/whl/!CUDA_VER!
210226 if !errorlevel! neq 0 (
211227 echo ERROR: Failed to install PyTorch!
212228 pause
You can’t perform that action at this time.
0 commit comments