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

Unable to resolve library issue. #1103

Closed
jbnv opened this issue Mar 22, 2023 · 11 comments
Closed

Unable to resolve library issue. #1103

jbnv opened this issue Mar 22, 2023 · 11 comments
Labels
new Just added, you should probably sort this.

Comments

@jbnv
Copy link

jbnv commented Mar 22, 2023

Mac OS, Apple M1 processor, Ventura 13.2.1. Don't know the GPU.

The Dreambooth etension isn't loading in the concepts on my models, nor is it recognizing them when I manually enter them. Before I call that in as a bug (it's already been called in by other people and ignored), I'm making a good-faith effort to do all the necessary updating and troubleshooting.

I'm stuck at the step cd venv/Scripts. My venv directory does not have a Scripts folder.

I also don't know what all this "CUDA setup" business is about. i tried running sudo ldconfig as suggested but I don't have ldconfig on my machine.

I'd like to get all of these library and dependency issues resolved before I proceed with figuring out why my concepts aren't loading. Thanks.

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on jay user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.10 (main, Feb 13 2023, 03:22:06) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing requirements for Web UI
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled

Initializing Dreambooth
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.10.10 (main, Feb 13 2023, 03:22:06) [Clang 14.0.0 (clang-1400.0.29.202)]
Dreambooth revision: 78ca4dabe9b269b7dae25960121c58c41e6c39e1
SD-WebUI revision: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2

Successfully installed accelerate-0.17.1
Successfully installed requests-2.28.2
Successfully installed fastapi-0.90.1 starlette-0.23.1
Successfully installed gitpython-3.1.31
Successfully installed transformers-4.27.2

[!] torch version 1.13.1 installed.
[!] torchvision version 0.13.1 installed.
[!] xformers NOT installed.
[+] accelerate version 0.17.1 installed.
[+] diffusers version 0.14.0 installed.
[+] transformers version 4.27.2 installed.
[+] bitsandbytes version 0.35.4 installed.

#######################################################################################################
#                                       LIBRARY ISSUE DETECTED                                        #
#######################################################################################################
#
# torch is below the required 1.13.1+cu116 version.
# torchvision is below the required 0.14.1+cu116 version.
#
# Dreambooth may not work properly.
#
# TROUBLESHOOTING
# 1. Fully restart your project (not just the webpage)
# 2. Update your A1111 project and extensions
# 3. Dreambooth requirements should have installed automatically, but you can manually install them
#    by running the following 4 commands from the A1111 project root:
cd venv/Scripts
activate
cd ../..
pip install -r ./extensions/sd_dreambooth_extension/requirements.txt
#######################################################################################################

Launching Web UI with arguments: --upcast-sampling --no-half-vae --use-cpu interrogate
/Users/jay/stable-diffusion-webui/venv/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: dlopen(/Users/jay/stable-diffusion-webui/venv/lib/python3.10/site-packages/torchvision/image.so, 0x0006): Symbol not found: __ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefIxEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEENS5_INS2_12MemoryFormatEEE
  Referenced from: <06D2C3BD-26E5-3AB9-A866-63839BE393A7> /Users/jay/stable-diffusion-webui/venv/lib/python3.10/site-packages/torchvision/image.so
  Expected in:     <44B645FB-F027-3EE5-86D7-DBF8E2FC6264> /Users/jay/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/lib/libtorch_cpu.dylib
  warn(f"Failed to load image Python extension: {e}")
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
No module 'xformers'. Proceeding without it.
Loading weights [5d5ad06cc2] from /Users/jay/stable-diffusion-webui/models/Stable-diffusion/mdjrny-v4.ckpt
Creating model from config: /Users/jay/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (InvokeAI).
Textual inversion embeddings loaded(1): Delphine Fairheart
Model loaded in 10.7s (load weights from disk: 1.0s, create model: 0.7s, apply weights to model: 3.2s, apply half(): 4.5s, move model to device: 1.0s, load textual inversion embeddings: 0.2s).
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes.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: Problem: The main issue seems to be that the main CUDA library was not detected.
CUDA SETUP: Solution 1): Your paths are probably not up-to-date. You can update them via: sudo ldconfig.
CUDA SETUP: Solution 2): If you do not have sudo rights, you can do the following:
CUDA SETUP: Solution 2a): Find the cuda library via: find / -name libcuda.so 2>/dev/null
CUDA SETUP: Solution 2b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_2a
CUDA SETUP: Solution 2c): For a permanent solution add the export from 2b into your .bashrc file, located at ~/.bashrc
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes.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: Problem: The main issue seems to be that the main CUDA library was not detected.
CUDA SETUP: Solution 1): Your paths are probably not up-to-date. You can update them via: sudo ldconfig.
CUDA SETUP: Solution 2): If you do not have sudo rights, you can do the following:
CUDA SETUP: Solution 2a): Find the cuda library via: find / -name libcuda.so 2>/dev/null
CUDA SETUP: Solution 2b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_2a
CUDA SETUP: Solution 2c): For a permanent solution add the export from 2b into your .bashrc file, located at ~/.bashrc
Exception importing xformers: No package metadata was found for xformers
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 18.0s (import gradio: 1.1s, import ldm: 0.4s, other imports: 0.8s, setup codeformer: 0.1s, load scripts: 3.6s, load SD checkpoint: 10.8s, create ui: 1.1s).
@jbnv jbnv added the new Just added, you should probably sort this. label Mar 22, 2023
@ArrowM
Copy link
Collaborator

ArrowM commented Mar 22, 2023

MacOS has some weird behavior with 8bit adam, try lion. You should open an issue on the bitsandbytes repo or check there for similar questions.

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 22, 2023

Also, please let me know if lion works. If it does, all make that startup error go away for macs and add an extra message about bitsandbytes.

@jbnv
Copy link
Author

jbnv commented Mar 23, 2023

What is "lion" and how do I try it?

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 23, 2023

It's an optimizer on the settings tab

@jbnv
Copy link
Author

jbnv commented Mar 23, 2023

Where are the optimizers? I don't have a subtab named "Optimizers" and a search for the string "lion" found nothing.

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 23, 2023

Dreambooth tab > middle column > settings tab > optimizer drop down

@jbnv
Copy link
Author

jbnv commented Mar 24, 2023

I found the setting, but all of the controls on my Dreambooth tab are disabled. And the page looks like a stylesheet didn't load.

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 24, 2023

screenshot?

@jbnv
Copy link
Author

jbnv commented Mar 25, 2023

screencapture-127-0-0-1-7860-2023-03-24-19_07_58

@ArrowM
Copy link
Collaborator

ArrowM commented Mar 25, 2023

Weird, can you not select or create a model on the left.

@jbnv
Copy link
Author

jbnv commented Mar 26, 2023

My bad, I overlooked that the Optimizer setting is a property of the model, not a general property. Once I set it, I found that my concepts were in fact loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Just added, you should probably sort this.
Projects
None yet
Development

No branches or pull requests

2 participants