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

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 #1307

Open
senzawapoi opened this issue Aug 6, 2024 · 0 comments

Comments

@senzawapoi
Copy link

System Info

windows10 python:3.10.7 cuda:12.4 pytorch:2.4.0+cu124

Reproduction

C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\matplotlib\projections_init_.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
bin C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\libbitsandbytes_cuda124.dll
False

===================================BUG REPORT===================================
C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cuda_setup\main.py:174: UserWarning: Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

warn(msg)

CUDA SETUP: PyTorch settings found: CUDA_VERSION=124, Highest Compute Capability: 7.5.
CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md
CUDA SETUP: Required library version not found: libbitsandbytes_cuda124.dll. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes_cpu.dll...

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

  1. You need to manually override the PyTorch CUDA version. Please see: "https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md
  2. CUDA driver not installed
  3. CUDA not installed
  4. You have multiple conflicting CUDA libraries
  5. 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 https://github.com/TimDettmers/bitsandbytes.git
cd bitsandbytes
CUDA_VERSION=124
python setup.py install
CUDA SETUP: Setup Failed!
Traceback (most recent call last):
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\webui.py", line 13, in
initialize.imports()
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\modules\initialize.py", line 26, in imports
from modules import paths, timer, import_hook, errors # noqa: F401
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\modules\paths.py", line 60, in
import sgm # noqa: F401
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\repositories\generative-models\sgm_init_.py", line 1, in
from .models import AutoencodingEngine, DiffusionEngine
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\repositories\generative-models\sgm\models_init_.py", line 1, in
from .autoencoder import AutoencodingEngine
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\repositories\generative-models\sgm\models\autoencoder.py", line 12, in
from ..modules.diffusionmodules.model import Decoder, Encoder
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\repositories\generative-models\sgm\modules_init_.py", line 1, in
from .encoders.modules import GeneralConditioner
File "C:\Users\DELL\Desktop\stable-diffusion-webui\stable-diffusion-webui\repositories\generative-models\sgm\modules\encoders\modules.py", line 5, in
import kornia
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\kornia_init_.py", line 11, in
from . import augmentation, color, contrib, core, enhance, feature, io, losses, metrics, morphology, tracking, utils, x
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\kornia\x_init_.py", line 2, in
from .trainer import Trainer
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\kornia\x\trainer.py", line 11, in
from accelerate import Accelerator
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\accelerate_init_.py", line 3, in
from .accelerator import Accelerator
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\accelerate\accelerator.py", line 35, in
from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\accelerate\checkpointing.py", line 24, in
from .utils import (
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\accelerate\utils_init_.py", line 131, in
from .bnb import has_4bit_bnb_layers, load_and_quantize_model
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\accelerate\utils\bnb.py", line 42, in
import bitsandbytes as bnb
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes_init_.py", line 6, in
from . import cuda_setup, utils, research
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\research_init_.py", line 1, in
from . import nn
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\research\nn_init_.py", line 1, in
from .modules import LinearFP8Mixed, LinearFP8Global
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\research\nn\modules.py", line 8, in
from bitsandbytes.optim import GlobalOptimManager
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\optim_init_.py", line 6, in
from bitsandbytes.cextension import COMPILED_WITH_CUDA
File "C:\Users\DELL\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cextension.py", line 20, in
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

Expected behavior

When I run stable-diffusion-webui, the following error occurs. Can anyone help me solve it? Thank you

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

1 participant