【Stable-Diffusion/SD-WebUI】最新版本相关问题及修复 Docker Stable-Diffusion

mowen 2023-05-16 1318

1、RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install.

# 安装torch/torchvision/torchaudio/xformers依赖
./venv/bin/pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 &&
./venv/bin/pip list|grep -e torch -e xformers
clip-anytorch             2.5.2
open-clip-torch           2.7.0
pytorch-lightning         1.9.4
torch                     2.0.0+cu118
torchaudio                2.0.0+cu118
torchdiffeq               0.2.3
torchmetrics              0.11.4
torchsde                  0.2.5
torchvision               0.15.1+cu118
xformers                  0.0.18


2、Cannot locate TCMalloc (improves CPU memory usage)

apt install -y libgoogle-perftools-dev libtcmalloc-minimal4


3、ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

./venv/bin/pip uninstall svglib reportlab &&
./venv/bin/pip install svglib reportlab==3.6.12


4、No module named 'pytorch_lightning.utilities.distributed'

将pytorch-lightning降级到1.7.7版本

pip install pytorch-lightning==1.7.7


5、Win版本安装dreambooth插件后,bitsandbytes报错BUG REPORT:

===================================BUG REPORT===================================
================================================================================
The following directories listed in your path were found to be non-existent: {WindowsPath('tmp/restart')}
CUDA_SETUP: WARNING! 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')}
DEBUG: Possible options found for libcudart.so: set()
CUDA SETUP: PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: 8.6.
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: Loading binary D:\sd1\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable
CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null
CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a
CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc
CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA.
CUDA SETUP: Solution 2a): Download CUDA install script: wget https://github.com/TimDettmers/bitsandbytes/blob/main/cuda_install.sh
CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO.
CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local

重装windows版本的bitsandbytes:

pip install bitsandbytes~=0.41.1 --prefer-binary --extra-index-url=https://jllllll.github.io/bitsandbytes-windows-webui


最新回复 (0)
返回
发新帖
X