bitsandbytes: CUDA Setup failed despite GPU being available

===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues

bin /lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda113.so False /lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: Found duplicate [‘libcudart.so’, ‘libcudart.so.11.0’, ‘libcudart.so.12.0’] files: {PosixPath(‘/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/libcudart.so.11.0’), PosixPath(‘/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/libcudart.so’)}… We’ll flip a coin and try one of these, in order to fail forward. Either way, this might cause trouble in the future: If you get CUDA error: invalid device function errors, the above might be the cause and the solution is to make sure only one [‘libcudart.so’, ‘libcudart.so.11.0’, ‘libcudart.so.12.0’] in the paths that we search based on your env. warn(msg) CUDA SETUP: CUDA runtime path found: /lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/libcudart.so.11.0 CUDA SETUP: Highest compute capability among GPUs detected: 7.5 CUDA SETUP: Detected CUDA version 113 CUDA SETUP: Required library version not found: libbitsandbytes_cuda113.so. Maybe you need to compile it from source? CUDA SETUP: Defaulting to libbitsandbytes_cpu.so…

================================================ERROR===================================== CUDA SETUP: CUDA detection failed! Possible reasons:

  1. CUDA driver not installed
  2. CUDA not installed
  3. You have multiple conflicting CUDA libraries
  4. Required library not pre-compiled for this bitsandbytes release! CUDA SETUP: If you compiled from source, try again with make CUDA_VERSION=DETECTED_CUDA_VERSION for example, make CUDA_VERSION=113. CUDA SETUP: The CUDA version for the compile might depend on your conda install. Inspect CUDA version via conda list | grep cuda. ================================================================================

CUDA SETUP: Something unexpected happened. Please compile from source: git clone git@github.com:TimDettmers/bitsandbytes.git cd bitsandbytes CUDA_VERSION=113 make cuda11x python setup.py install CUDA SETUP: Setup Failed! Traceback (most recent call last): File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/runpy.py”, line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/runpy.py”, line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/runpy.py”, line 110, in _get_module_details import(pkg_name) File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/init.py”, line 6, in <module> from . import cuda_setup, utils, research File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/research/init.py”, line 1, in <module> from . import nn File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/research/nn/init.py”, line 1, in <module> from .modules import LinearFP8Mixed, LinearFP8Global File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/research/nn/modules.py”, line 8, in <module> from bitsandbytes.optim import GlobalOptimManager File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/optim/init.py”, line 6, in <module> from bitsandbytes.cextension import COMPILED_WITH_CUDA File “/lfs/hyperturing1/0/allyc/miniconda/envs/cs197/lib/python3.10/site-packages/bitsandbytes/cextension.py”, line 20, in <module> raise RuntimeError(‘’’ RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information:

    python -m bitsandbytes

    Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
    to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
    and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 19 (1 by maintainers)

Most upvoted comments

  1. Open cmd, run this: python.exe -m pip install bitsandbytes-windows

  2. go to C:\Users\Me\AppData\Local\Programs\Python\Python310\Lib\site-packages

or wherever you have installed Python 3.10 idk.

copy bitsandbytes folder.

  1. paste and replace in your “\venv\Lib\site-packages”

for me is C:\stable-diffusion-webui\venv\Lib\site-packages.

now it works.

After a windows update this error appears when launching SD automatic 1111. I am not a programmer and I don’t know how to fix it. Please help me. How to fix this error? Error Launch

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)