Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FurkanGozukara opened this issue Oct 1, 2024 · 8 comments

Comments

@FurkanGozukara
Copy link

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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

@FurkanGozukara
Copy link
Author

@danthe3rd

pip install xformers==0.0.28.post1

@danthe3rd
Copy link
Contributor

Try with:

pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu124

@FurkanGozukara
Copy link
Author

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

@Charging-up
Copy link

Try with:

pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu124

I'm about crying,really。I met a problem when using pip3 install xformers==0.0.28.post3 -f https://download.pytorch.org/whl/cuda/12.4/torch_stable.html, and I've been searching the solution for a whole day, when I try your's command, it just worked ,thank you very much。I tried to fix cl.exe、Various environment variable configurations,they all can't work:
`E:\Temp\tmpxft_000014dc_00000000-7_flash_bwd_hdim128_bf16_causal_sm80.compute_90.cudafe1.cpp : fatal error C1083: 无法打开编译器生成的文件: “”: Invalid argument
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc' failed with exit code 4294967295
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xformers
Running setup.py clean for xformers
Failed to build xformers
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (xformers)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants