Table
版本
https://download.pytorch.org/whl/torch_stable.html
torch | torchvision | |
---|---|---|
cu90 | 0.3.0, 0.3.1, 0.4.0, 0.4.1, 1.0.[01], 1.1.1 |
|
cu91 | 0.3.1, 0.4.0 | |
cu92 | 0.4.1, 1.2.0, 1.3.[01], 1.4.0, 1.5.[01], 1.6.0, 1.7.[01] |
|
cu100 | 1.3.0, 1.4.0, 1.5.0 | 0.4.1, 0.4.2, 0.4.3 0.5.0 |
cu101 | 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1 |
|
cu102 | 1.5.0–1.12.1 | |
cu110 | 1.7.0,1.7.1 | |
cu111 | 1.8.[01], 1.9.[01] ,1.10.[012] | |
cu113 | 1.10, 1.11, 1.12, | |
cu115 | 1.11 | |
cu116 | 1.12, 1.13, | |
cu117 | 1.13, 2.0.0, 2.0.1 | |
cu118 | 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1 | |
cu121 | 2.1.[012], 2.2.[01] |
LibTorch
Conda
pytorch | CUDA | |
---|---|---|
1.5.1_cu92 | conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=9.2 -c pytorch | |
1.5.1_cu101 | conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.1 -c pytorch | |
1.5.1_CPU | conda install pytorch==1.5.1 torchvision==0.6.1 cpuonly -c pytorch | |
1.10.1_cu102 | conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=10.2 -c pytorch | |
1.8.0_cu111_docker | docker pull pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel | |
1.8.0_cu111 | conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge | - |
2.1.2_cu118 | conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 cudatoolkit=11.8 -c pytorch -c nvidia | |
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=11.8 -c pytorch -c nvidia | ||
2.2.1_cu118 |
pytorch-lightning
安装pytorch-lightning时一定注意自己的torch是pip安装还是conda安装,pytorch_lightning 安装方式要与torch的安装方式保持一致,否则也会导致你的torch版本被替换。
conda install pytorch-lightning -c conda-forge
Pip
CUDA 11.8 | pip3 install torch torchvision torchaudio –index-url https://download.pytorch.org/whl/cu118 | |
CPU | pip3 install torch torchvision torchaudio –index-url https://download.pytorch.org/whl/cpu | |
CUDA-92 | https://download.pytorch.org/whl/cu92 |
版本关系
pytorch | xformers | differusers | transformers | ||
---|---|---|---|---|---|
torch==2.2.2 | 0.0.25.post1 | ||||
torch==2.2.1 | 0.0.25 | 4.36.2 | |||