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

bitsandbytes not working with windows 11 #822

Closed
haris525 opened this issue Oct 13, 2023 · 3 comments
Closed

bitsandbytes not working with windows 11 #822

haris525 opened this issue Oct 13, 2023 · 3 comments

Comments

@haris525
Copy link

haris525 commented Oct 13, 2023

Hi guys, I hope you are all doing well. I seem to be having some issues with bitsandbytes with windows 11. Here are my system specs

windows 11
cuda 12.2
python 3.9

so I followed the windows solution here
https://github.com/jllllll/bitsandbytes-windows-webui

but I think I missed a set to update the main.py file
my environment path where the package is installed is
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes

I am pretty sure I need to make this change
in cuda_setup/main.py:
make evaluate_cuda_setup() always return "libbitsandbytes_cuda116.dll"
in ./cextension.py:
change ct.cdll.LoadLibrary(binary_path) to ct.cdll.LoadLibrary(str(binary_path))

when I run python -m bitsandbytes - the following is returned - obviously
C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes*libbitsandbytes_cpu.so* this bold portion looks wrong, as we should be looking for .dll correct?

`bin C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so
C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes\cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
function 'cadam32bit_grad_fp32' not found
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++ BUG REPORT INFORMATION ++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++ ANACONDA CUDA PATHS ++++++++++++++++++++
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda111.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda111_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda112.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda112_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda113.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda113_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda114.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda114_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda115.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda115_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda116.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda116_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda117.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda117_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda118_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda120.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda120_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda121_nocublaslt.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda122.dll
C:\Users\haris\anaconda3\envs\mistral-7b\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda122_nocublaslt.dll

Traceback (most recent call last):
File "C:\Users\haris\anaconda3\envs\mistral-7b\lib\runpy.py", line 197, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\haris\anaconda3\envs\mistral-7b\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes_main
.py", line 121, in
generate_bug_report_information()
File "C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes_main
.py", line 64, in generate_bug_report_information
paths = find_file_recursive(torch_libs_path, f'cuda{SHARED_LIB_EXTENSION}')
File "C:\Users\haris\anaconda3\envs\mistral-7b\lib\site-packages\bitsandbytes_main
.py", line 41, in find_file_recursive
raise RuntimeError('Something when wrong when trying to find file.')
RuntimeError: Something when wrong when trying to find file.`

Would appreciate the feedback / help
Thanks

@smbzhang
Copy link

这个库没人维护吗

@swumagic
Copy link

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)

Copy link

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.

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