编译xformers
环境
Package Version
----------------- ------------
filelock 3.18.0
fsspec 2025.7.0
Jinja2 3.1.6
MarkupSafe 3.0.2
mpmath 1.3.0
networkx 3.5
ninja 1.11.1.4
numpy 2.3.2
packaging 25.0
pillow 11.3.0
pip 25.2
setuptools 80.9.0
sympy 1.14.0
torch 2.8.0+cu129
torchaudio 2.8.0+cu129
torchvision 0.23.0+cu129
typing_extensions 4.14.1
一、clone xformers
git clone https://github.com/facebookresearch/xformers.git
二、进入 xFormers 目录并初始化子模块
cd xformersgit config --global core.longpaths true
git submodule deinit --all -f
git submodule update --init --recursive
三、编译whl
python setup.py bdist_wheel
四、编译成功
在dist目录出现xformers-0.0.32+635a8ab2.d20250810-cp39-abi3-win_amd64.whl
五、安装
路径更改为你的路径
python -m pip install --upgrade D:\Git\xformers\dist\xformers-0.0.32+635a8ab2.d20250810-cp39-abi3-win_amd64.whl