截止目前最新的Linux&Windows系统平台上pip安装的xformers版本与pytorch版本和CUDA版本关系对照表
xformers | pytorch | CUDA |
0.0.28 | torch==2.4.1 | cu118,cu121,cu124 |
0.0.28.post1 | torch==2.4.1 | cu118,cu121,cu124 |
0.0.27 | torch==2.3.0 | cu118,cu121 |
0.0.27.post2 | torch==2.3.1 | cu118,cu121 |
0.0.27.post1 | torch==2.3.1 | cu118,cu121 |
0.0.26 | torch==2.2.0 | cu118,cu121 |
0.0.25 | torch==2.2.0 | cu118,cu121 |
0.0.24 | torch==2.2.0 | cu118,cu121 |
0.0.23 | torch==2.1.1 | |
0.0.22 | torch==2.0.1 | |
0.0.21 | torch==2.0.1 | |
0.0.20 | torch==2.0.1 | |
0.0.19 | torch==2.0.0 | |
0.0.18 | torch==2.0.0 | |
0.0.17 | torch==1.13.1 |
xformers v0.0.28版本Linux&Windows平台安装pip命令参考:
# [linux only] cuda 11.8 version
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu118
# [linux only] cuda 12.1 version
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
# [linux & win] cuda 12.4 version
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu124
# [linux only] (EXPERIMENTAL) rocm 6.1 version
pip3 install -U xformers --index-url https://download.pytorch.org/whl/rocm6.1
安装xformers的时候可以和torch一起安装,不然的话torch还会再重新安装一次,而且torch会自动选择到当前xformers支持到的最新版本,可能会与你当前想要的torch版本不一样导致torchvision等版本冲突
附:
xformers whl下载链接:https://download.pytorch.org/whl/xformers/
xformers项目地址:https://github.com/facebookresearch/xformers