facebookresearch / xformers

Hackable and optimized Transformers building blocks, supporting a composable construction.
https://facebookresearch.github.io/xformers/
Other
8.66k stars 617 forks source link

Why xformers 0.0.28.post1 doesn't have pre-compiled wheel for Windows? #1118

Open FurkanGozukara opened 1 month ago

FurkanGozukara commented 1 month ago

Torch 2.4.1 with CUDA 12.4 in system installed but it still fails :/


close your already started web UI instance first
Requirement already satisfied: requests in c:\python310\lib\site-packages (2.32.3)
Requirement already satisfied: idna<4,>=2.5 in c:\python310\lib\site-packages (from requests) (3.10)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\python310\lib\site-packages (from requests) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\python310\lib\site-packages (from requests) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\python310\lib\site-packages (from requests) (2024.8.30)

[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: python.exe -m pip install --upgrade pip
fatal: destination path 'adetailer' already exists and is not an empty directory.
Looking in indexes: https://download.pytorch.org/whl/cu124
Requirement already satisfied: torch==2.4.1 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (2.4.1+cu124)
Requirement already satisfied: torchvision in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (0.19.1+cu124)
Requirement already satisfied: torchaudio in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (2.4.1+cu124)
Requirement already satisfied: filelock in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torch==2.4.1) (3.16.1)
Requirement already satisfied: typing-extensions>=4.8.0 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages(from torch==2.4.1) (4.12.2)
Requirement already satisfied: sympy in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torch==2.4.1) (1.13.3)
Requirement already satisfied: networkx in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torch==2.4.1) (3.3)
Requirement already satisfied: jinja2 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torch==2.4.1) (3.1.4)
Requirement already satisfied: fsspec in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torch==2.4.1) (2024.9.0)
Requirement already satisfied: numpy in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torchvision)(1.26.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from torchvision) (9.5.0)
Requirement already satisfied: MarkupSafe>=2.0 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (from jinja2->torch==2.4.1) (2.1.5)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in r:\auto1111_v9\stable-diffusion-webui\venv\lib\site-packages (fromsympy->torch==2.4.1) (1.3.0)
Collecting xformers==0.0.28.post1
  Using cached xformers-0.0.28.post1.tar.gz (7.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "R:\Auto1111_V9\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "R:\Auto1111_V9\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "R:\Auto1111_V9\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Furkan\AppData\Local\Temp\pip-build-env-jfiy28jo\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "C:\Users\Furkan\AppData\Local\Temp\pip-build-env-jfiy28jo\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "C:\Users\Furkan\AppData\Local\Temp\pip-build-env-jfiy28jo\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\Furkan\AppData\Local\Temp\pip-build-env-jfiy28jo\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 24, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Press any key to continue . . .
FurkanGozukara commented 1 month ago

by the way the compiled wheel zip file works

i uploaded to hugging face and installed from there and tested it works

but pip doesnt have it

danthe3rd commented 1 month ago

Yes you have to download from the pytorch mirror with pip, and then it should work (although I don't have a windows machine to test)

FurkanGozukara commented 1 month ago

Yes you have to download from the pytorch mirror with pip, and then it should work (although I don't have a windows machine to test)

The same way works for older xformers I don't get difference can you eloborate?

danthe3rd commented 1 month ago

What is the exact command you are using to install it?

FurkanGozukara commented 1 month ago

@danthe3rd

pip install xformers==0.0.28.post1

danthe3rd commented 1 month ago

Try with:

pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu124
FurkanGozukara commented 1 month ago

this works great --index-url https://download.pytorch.org/whl/cu124

@danthe3rd any torch 2.5 version available including dev?

where can i find?

ty