xformers
xformers copied to clipboard
error when building from source
Command
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
To Reproduce
attempt to install from source
Environment
- PyTorch Version (e.g., 1.0): 2.1.0+cu121
- OS (e.g., Linux): Microsoft Windows 11 Home
- How you installed PyTorch (
conda
,pip
, source): conda - Build command you used (if compiling from source): pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
- Python version: 3.10.9
- CUDA/cuDNN version: 12.1
- GPU models and configuration: 4070ti
- Any other relevant information:
- the error I'm getting is:
ninja: error: Stat(C:/Users/joker/AppData/Local/Temp/pip-install-0um11ta2/xformers_7bae8db5c8e145569eac020431c758f0/build/temp.win-amd64-cpython-310/Release/Users/joker/AppData/Local/Temp/pip-install-0um11ta2/xformers_7bae8db5c8e145569eac020431c758f0/third_party/flash-attention/csrc/flash_attn/flash_api.obj): Filename longer than 260 characters
during building process
Hi @Shaistrong Windows has a limitation on the maximum path length - that's quite annoying, but it's not related to xFormers. I'm not sure how to work around this... Can't you install a binary wheel from xFormers with this directly?
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
I think I have a fix here: https://github.com/facebookresearch/xformers/pull/935
try https://github.com/facebookresearch/xformers/issues/960