Closed fulleclip closed 8 months ago
this solved it for me
pip uninstall bitsandbytes
pip install bitsandbytes~=0.41.1 --prefer-binary --extra-index-url=https://jllllll.github.io/bitsandbytes-windows-webui
That didn't work for me :(
I once updated Dreambooth to its latest version and after performing the commands that somdeepjana comments on, the CUDA errors have disappeared.
--- LOG---
Already up to date. venv "D:\sd1\stable-diffusion-webui\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 bin D:\sd1\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.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: --xformers --medvram-sdxl --no-half-vae
[-] ADetailer initialized. version: 23.10.0, num models: 9
2023-10-09 16:40:25,942 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: D:\sd1\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-10-09 16:40:26,120 - ControlNet - INFO - ControlNet v1.1.410
Loading weights [75c3811b23] from D:\sd1\stable-diffusion-webui\models\Stable-diffusion\starlightXLAnimated_v2.safetensors
D:\sd1\stable-diffusion-webui\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):
bin D:\sd1\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.dll
Creating model from config: D:\sd1\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Running on local URL: http://127.0.0.1:7860
To create a public link, set share=True
in launch()
.
Startup time: 81.4s (prepare environment: 64.7s, import torch: 5.2s, import gradio: 1.3s, setup paths: 1.2s, initialize shared: 0.3s, other imports: 0.9s, setup codeformer: 0.2s, setup gfpgan: 0.2s, load scripts: 4.2s, create ui: 2.5s, gradio launch: 0.6s).
This does make the CUDA errors disappear, but Dreambooth training still fails with this:
Steps: 0%| Traceback (most recent call last): | 0/4000 [00:00<?, ?it/s] File "C:\Users\bobdo\pinokio\api\sd-webui.pinokio.git\automatic1111\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 730, in start_training result = main(class_gen_method=class_gen_method) File "C:\Users\bobdo\pinokio\api\sd-webui.pinokio.git\automatic1111\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1809, in main return inner_loop() File "C:\Users\bobdo\pinokio\api\sd-webui.pinokio.git\automatic1111\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 126, in decorator return function(batch_size, grad_size, prof, *args, **kwargs) File "C:\Users\bobdo\pinokio\api\sd-webui.pinokio.git\automatic1111\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1684, in inner_loop logs["inst_loss"] = float(instance_loss.detach().item()) UnboundLocalError: local variable 'instance_loss' referenced before assignment
Which is being tracked https://github.com/d8ahazard/sd_dreambooth_extension/issues/1363
this solved it for me
pip uninstall bitsandbytes
pip install bitsandbytes~=0.41.1 --prefer-binary --extra-index-url=https://jllllll.github.io/bitsandbytes-windows-webui
worked for me!
Just fantastic, got the same issue but reinstalling bits and bytes did not help. It actually was already installed with the required version. But it seems some other things are broken too. It tells me it can't find my custom paths to my models as well. And the CUDA error remains too. But i need a break before going down that rabbit hole. I guess i need to write a script to reinstall SD and make backups of everything.^^
I found that each time dreambooth startup , it will check the bitsandbytes and reinstall it. I don't know why it always install linux package on windows. I manually copy windows version to venv site-package path. It works.
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)
OR you are Linux distribution (Ubuntu, MacOS, etc.)system ,AND CUDA Version: 11.X.
Bitsandbytes can support ubuntu.(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/TimDettmers/bitsandbytes/releases/download/0.41.0/bitsandbytes-0.41.0-py3-none-any.whl
Replace your SD venv directory file(python.exe Folder) here(J:\StableDiffusion\sdwebui\py310)
This should be fixed on the latest version of the release for windows. Please open a new issue if you're still encountering the error after a fresh install of the extension.
Is there an existing issue for this?
What happened?
After the last update, errors related to CUDA appear
Steps to reproduce the problem
Update to the latest version from Stable Diffusion, then reboot
Commit and libraries
Starting at
Initializing Dreambooth
and ending several lines below at[+] bitsandbytes version 0.35.4 installed.
.Command Line Arguments
Console logs
Additional information
No response