xformers icon indicating copy to clipboard operation
xformers copied to clipboard

FileNotFoundError: [WinError 3] The system cannot find the specified path: 'C:\\xformers\\third_party\\flash-attention\\flash_attn'

Open metahades18892 opened this issue 1 year ago • 2 comments

i have this error

C:\xformers>python setup.py install Traceback (most recent call last): File "C:\xformers\setup.py", line 479, in symlink_package( File "C:\xformers\setup.py", line 112, in symlink_package shutil.copytree(src=path_from, dst=path_to) File "C:\Users\kevin\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 598, in copytree with os.scandir(src) as itr: ^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 3] El sistema no puede encontrar la ruta especificada: 'C:\xformers\third_party\flash-attention\flash_attn'

C:\xformers>git pull fatal: not a git repository (or any of the parent directories): .git

C:\xformers>

metahades18892 avatar May 19 '24 18:05 metahades18892

I ran into this issue just now and this is a pain to resolve but I got it working. This is caused by 260 filename length / path limit.

  1. Disable windows 260 limit. Powershell admin: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

2, Set git to enable longer than 260 paths git config --global core.longpaths true

  1. Ninja still has the 260 limitation builtin. Get around this by cloning to c:\xformers or some short path. Need to clone recursively: git clone --recursive https://github.com/facebookresearch/xformers.git

  2. cd xformers

  3. set MAX_JOBS=4 # depends on your system specs

  4. python setup.py install

  5. This method compiles for me. I'm running windows 11, cuda 12.4, torch 2.4, nvidia driver v555

dicksondickson avatar May 24 '24 08:05 dicksondickson

i have this error

C:\xformers>python setup.py install Traceback (most recent call last): File "C:\xformers\setup.py", line 479, in symlink_package( File "C:\xformers\setup.py", line 112, in symlink_package shutil.copytree(src=path_from, dst=path_to) File "C:\Users\kevin\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 598, in copytree with os.scandir(src) as itr: ^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 3] El sistema no puede encontrar la ruta especificada: 'C:\xformers\third_party\flash-attention\flash_attn'

C:\xformers>git pull fatal: not a git repository (or any of the parent directories): .git

C:\xformers>

git clone ...... ### --recursive

JimWang151 avatar Aug 02 '24 02:08 JimWang151