bitsandbytes-foundation / bitsandbytes

Accessible large language models via k-bit quantization for PyTorch.
https://huggingface.co/docs/bitsandbytes/main/en/index
MIT License
6.19k stars 622 forks source link

Missing Windows support #30

Closed TimDettmers closed 9 months ago

TimDettmers commented 2 years ago

Currently, the library uses precompiled Linux binaries. I am unsure how compatible these are with standard PyTorch installs on Windows. It might be that the binaries need to be compiled against mingw32/64 to create functional binaries for Windows.

The most helpful would be a case where a person is able to compile from source and use the library. This will require altering the Makefile file. If this works, we can add instructions on compiling for Windows as a first step before doing a full-scale Windows deployment of binaries on pip.

Since I do not have a Windows machine, any help is wanted on this!

stoperro commented 1 year ago

"compile it yourself" can be a blocker indeed, especially as this is lib for Python and compilation errors one may get will be from C++. I could find time to make a PR with whatever was done till now and polish it where necessary, though not sure if someone is doing it already.

YoungPhlo commented 1 year ago

If anyone else is still searching for a Windows solution and doesn't want to lose a few hours to the same issue just use this repo: https://github.com/jllllll/bitsandbytes-windows-webui

The README even includes a pip install command and (as of 0.41.1) installs the newest version of bitsandbytes... only difference is that it's compatible with windows. Includes .dll instead of .so and cuda_setup\main.py works with us

FurkanGozukara commented 1 year ago

If anyone else is still searching for a Windows solution ~and doesn't want to lose a few hours to the same issue~ just use this repo: https://github.com/jllllll/bitsandbytes-windows-webui

The README even includes a pip install command and (as of 0.41.1) installs the newest version of bitsandbytes... only difference is that it's compatible with windows. Includes .dll instead of .so and cuda_setup\main.py works with us

wow very nice

WilsonRoblesTafco commented 1 year ago

If anyone else is still searching for a Windows solution ~and doesn't want to lose a few hours to the same issue~ just use this repo: https://github.com/jllllll/bitsandbytes-windows-webui

The README even includes a pip install command and (as of 0.41.1) installs the newest version of bitsandbytes... only difference is that it's compatible with windows. Includes .dll instead of .so and cuda_setup\main.py works with us

Legend it worked for me I was one of those looking for hours xDD

swumagic commented 11 months ago

Bitsandbytes was not supported windows before, but my method can support windows.(yuhuang) 1 open folder J:\StableDiffusion\sdwebui,Click the address bar of the folder and enter CMD or WIN+R, CMD 。enter,cd /d J:\StableDiffusion\sdwebui 2 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes

3 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes-windows

4 J:\StableDiffusion\sdwebui\py310\python.exe -m pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl

Replace your SD venv directory file(python.exe Folder) here(J:\StableDiffusion\sdwebui\py310)

GanizaniSitara commented 11 months ago

pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl

Excellent! On Anaconda same thing applies - has to be root of the venv

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.