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

[Bug]: CUDA_SETUP: WARNING! libcudart.so not found in any environmental path #13741

Open
1 task done
need4swede opened this issue Oct 23, 2023 · 2 comments
Open
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@need4swede
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Fresh install of gui. Xformers enabled in .bat file.
Every time I start a session, I noticed that xformers has a warning.
[!] xformers version 0.0.20 installed.

Followed by this message:

The following directories listed in your path were found to be non-existent: {WindowsPath('tmp/restart')}
CUDA_SETUP: WARNING! [libcudart.so](https://libcudart.so/) not found in any environmental path. Searching in backup paths...
The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}

My workaround is to activate the venv and pip install bitsandbytes-windows
This changes the bug report window to:

binary_path: C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll
CUDA SETUP: Loading binary C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll...

but Xformers still has an exclamation mark on startup and I think I should be using CUDA 11.8

Steps to reproduce the problem

  1. Clone repo
  2. add --xformers to web-user.bat
  3. Launch gui.

What should have happened?

No error on startup

Sysinfo

sysinfo-2023-10-23-22-49.txt

What browsers do you use to access the UI ?

No response

Console logs

venv "C:\Users\Asgard\Applications\Stable Diffusion\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements
===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
binary_path: C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll
CUDA SETUP: Loading binary C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll...
If submitting an issue on github, please provide the full startup log for debugging purposes.

Initializing Dreambooth
Dreambooth revision: 1a1d1621086a4725fda1200256f319c845dc7a8a
Successfully installed accelerate-0.23.0 fastapi-0.94.1 transformers-4.32.1

[!] xformers version 0.0.20 installed.
[+] torch version 2.0.1+cu118 installed.
[+] torchvision version 0.15.2+cu118 installed.
[+] accelerate version 0.23.0 installed.
[+] diffusers version 0.21.4 installed.
[+] transformers version 4.32.1 installed.
[+] bitsandbytes version 0.41.1 installed.
Launching Web UI with arguments: --autolaunch --no-half-vae --xformers
2023-10-23 15:35:46,199 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: C:\Users\Asgard\Applications\Stable Diffusion\extensions\sd-webui-controlnet\annotator\downloads
2023-10-23 15:35:46,281 - ControlNet - INFO - ControlNet v1.1.411
Loading weights [31e35c80fc] from C:\Users\Asgard\Applications\Stable Diffusion\models\Stable-diffusion\sd_xl_base_1.0.safetensors
C:\Users\Asgard\Applications\Stable Diffusion\extensions\sd_dreambooth_extension\scripts\main.py:301: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row().style(equal_height=False):

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
binary_path: C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll
CUDA SETUP: Loading binary C:\Users\Asgard\Applications\Stable Diffusion\venv\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll...
Running on local URL:  http://127.0.0.1:7860

Additional information

No response

@need4swede need4swede added the bug-report Report of a bug, yet to be confirmed label Oct 23, 2023
@chchchadzilla
Copy link

chchchadzilla commented Oct 25, 2023

I noticed the same thing, although I did manage to get rid of the error, although the exclamation point for xformers still remains, and anything involving xformers usually won't work -- if I select xformers as my cross-attn opt, or even just do automatic, it will not generate any images and give me errors.

my workaround was:

  1. Go into C:....stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\cuda_setup
  2. Right click and edit "main.py"
  3. Scroll to line 38
  4. Add to line 38 ", 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8' " inside the parenthesis
  5. So, the whole line should read: " backup_paths.append('$CONDA_PREFIX/lib/libcudart.so.11.0', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8') " -- but without the very first and last " characters.
  6. Save,
  7. Relaunch

CUDA errors now gone, but xformers still doesn't work. Also, if it wasn't obvious, where my "c:\program files\..." path to the CUDA installation is, you need to put where ever your CUDA installation is located. I did the default for all options when installing it so, unless you changed it, or have a drive other than C you have it installed on, it should be the same path. not sure how to get this thing to let me write double back slashes, but, in the path, all of the backslashes for the new path you add have to be doubled.

@need4swede
Copy link
Author

need4swede commented Oct 25, 2023

@chchchadzilla

Do you have any extensions enabled, by any chance? I think my dreambooth extension has something to do with the initial errors.

I was able to fix it by messing around with the bitsandbytes package.

For Windows x64:
I uploaded the package to my GDrive. Download it
Unzip it to your venv\Lib\site-packages directory.

Add these commands to your webui-user-bat:
--xformers --disable-safe-unpickle --force-enable-xformers

Launch the webui and see if you still get errors. If you do, try removing your extensions and re-launching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

2 participants