stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Stopped working after latest update

Open That-Dude opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

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

What happened?

Everything was working great for a few weeks, then today I did:

git pull

docker compose --profile auto up --build

and received this error at the end of the start process:

...
webui-docker-auto-1  | Mounted BSRGAN
webui-docker-auto-1  | Mounted Codeformer
webui-docker-auto-1  | Mounted extensions
webui-docker-auto-1  | Traceback (most recent call last):
webui-docker-auto-1  |   File "/stable-diffusion-webui/webui.py", line 35, in <module>
webui-docker-auto-1  |     from modules import extra_networks, ui_extra_networks_checkpoints
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 5, in <module>
webui-docker-auto-1  |     from modules import shared, ui_extra_networks, sd_models
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/ui_extra_networks.py", line 8, in <module>
webui-docker-auto-1  |     from modules.images import read_info_from_image
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/images.py", line 21, in <module>
webui-docker-auto-1  |     from modules import sd_samplers, shared, script_callbacks, errors
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers.py", line 1, in <module>
webui-docker-auto-1  |     from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers_compvis.py", line 9, in <module>
webui-docker-auto-1  |     from modules import sd_samplers_common, prompt_parser, shared
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers_common.py", line 5, in <module>
webui-docker-auto-1  |     from modules import devices, processing, images, sd_vae_approx
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/processing.py", line 12, in <module>
webui-docker-auto-1  |     import cv2
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
webui-docker-auto-1  |     bootstrap()
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
webui-docker-auto-1  |     native_module = importlib.import_module("cv2")
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
webui-docker-auto-1  |     return _bootstrap._gcd_import(name[level:], package, level)
webui-docker-auto-1  | ImportError: libGL.so.1: cannot open shared object file: No such file or directory
webui-docker-auto-1 exited with code 1

Any ideas on what I can try?

Steps to reproduce the problem

git pull

docker compose --profile auto up --build

What should have happened?

Docker should have started

Commit where the problem happens

15th May 16.15pm

What platforms do you use to access the UI ?

Windows, Linux, MacOS

What browsers do you use to access the UI ?

Brave

Command Line Arguments

no

List of extensions

no

Console logs

16:11:00 ✔ bigbird:/mnt/user/appdata/stable-diffusion-webui-docker >docker compose --profile auto up --build
[+] Building 1.3s (33/33) FINISHED                                                                                                                                                                                
 => [internal] load build definition from Dockerfile                                                                                                                                                         0.0s
 => => transferring dockerfile: 32B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                            0.1s
 => => transferring context: 2B                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/python:3.10.9-slim                                                                                                                                        1.0s
 => [internal] load metadata for docker.io/alpine/git:2.36.2                                                                                                                                                 0.9s
 => [internal] load metadata for docker.io/library/alpine:3.17                                                                                                                                               1.0s
 => [internal] load build context                                                                                                                                                                            0.0s
 => => transferring context: 149B                                                                                                                                                                            0.0s
 => [xformers 1/3] FROM docker.io/library/alpine:3.17@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126                                                                                0.0s
 => [stage-2  1/15] FROM docker.io/library/python:3.10.9-slim@sha256:76dd18d90a3d8710e091734bf2c9dd686d68747a51908db1e1f41e9a5ed4e2c5                                                                        0.0s
 => [download 1/8] FROM docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84                                                                                  0.0s
 => CACHED [stage-2  2/15] RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils aria2 -y && apt-get clean                                                                              0.0s
 => CACHED [stage-2  3/15] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip   aria2c -x 5 --dir /cache --out torch-2.0.0-cp310-cp310-linux_x86_64.whl -c   https://download.  0.0s
 => CACHED [stage-2  4/15] RUN --mount=type=cache,target=/root/.cache/pip   git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git &&   cd stable-diffusion-webui &&   git reset --hard d7ae  0.0s
 => CACHED [xformers 2/3] RUN apk add --no-cache aria2                                                                                                                                                       0.0s
 => CACHED [xformers 3/3] RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/5.0.3/xformers-0.0.20.dev528-cp310-cp310-manylinux2014_x86_6  0.0s
 => CACHED [stage-2  5/15] RUN --mount=type=cache,target=/root/.cache/pip    --mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0.0.20.dev528-cp310-cp310-manylinux2014_x86_64.whl   pip in  0.0s
 => CACHED [download 2/8] COPY clone.sh /clone.sh                                                                                                                                                            0.0s
 => CACHED [download 3/8] RUN . /clone.sh taming-transformers https://github.com/CompVis/taming-transformers.git 24268930bf1dce879235a7fddd0b2355b84d7ea6   && rm -rf data assets **/*.ipynb                 0.0s
 => CACHED [download 4/8] RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git 47b6b607fdd31875c9279cd2f4f16b92e4ea958e   && rm -rf assets data/**/*.png data/  0.0s
 => CACHED [download 5/8] RUN . /clone.sh CodeFormer https://github.com/sczhou/CodeFormer.git c5b4593074ba6214284d6acd5f1719b6c5d739af   && rm -rf assets inputs                                             0.0s
 => CACHED [download 6/8] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9                                                                               0.0s
 => CACHED [download 7/8] RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 5b3af030dd83e0297272d861c19477735d0317ec                                                                  0.0s
 => CACHED [download 8/8] RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2486589f24165c8e3b303f84e9dbbea318df83e8                                                    0.0s
 => CACHED [stage-2  6/15] COPY --from=download /repositories/ /stable-diffusion-webui/repositories/                                                                                                         0.0s
 => CACHED [stage-2  7/15] RUN mkdir /stable-diffusion-webui/interrogate && cp /stable-diffusion-webui/repositories/clip-interrogator/data/* /stable-diffusion-webui/interrogate                             0.0s
 => CACHED [stage-2  8/15] RUN --mount=type=cache,target=/root/.cache/pip   pip install -r /stable-diffusion-webui/repositories/CodeFormer/requirements.txt                                                  0.0s
 => CACHED [stage-2  9/15] RUN --mount=type=cache,target=/root/.cache/pip   pip install pyngrok   git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379   git+https://githu  0.0s
 => CACHED [stage-2 10/15] RUN apt-get -y install libgoogle-perftools-dev && apt-get clean                                                                                                                   0.0s
 => CACHED [stage-2 11/15] RUN --mount=type=cache,target=/root/.cache/pip   cd stable-diffusion-webui &&   git fetch &&   git reset --hard 5ab7f213bec2f816f9c5644becb32eb72c8ffb89 &&   pip install -r req  0.0s
 => CACHED [stage-2 12/15] RUN --mount=type=cache,target=/root/.cache/pip  pip install -U opencv-python-headless                                                                                             0.0s
 => CACHED [stage-2 13/15] COPY . /docker                                                                                                                                                                    0.0s
 => CACHED [stage-2 14/15] RUN   python3 /docker/info.py /stable-diffusion-webui/modules/ui.py &&   mv /stable-diffusion-webui/style.css /stable-diffusion-webui/user.css &&   sed -i 's/in_app_dir = .*/in  0.0s
 => CACHED [stage-2 15/15] WORKDIR /stable-diffusion-webui                                                                                                                                                   0.0s
 => exporting to image                                                                                                                                                                                       0.1s
 => => exporting layers                                                                                                                                                                                      0.0s
 => => writing image sha256:f6a3e4184ac892a2928263c38008759debabeea41d3b7bee3fa182b53c0f8bf4                                                                                                                 0.0s
 => => naming to docker.io/library/sd-auto:55                                                                                                                                                                0.0s
[+] Running 1/0
 ✔ Container webui-docker-auto-1  Created                                                                                                                                                                    0.0s 
Attaching to webui-docker-auto-1
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted openpose
webui-docker-auto-1  | Mounted LyCORIS
webui-docker-auto-1  | Mounted ModelScope
webui-docker-auto-1  | Mounted LDSR
webui-docker-auto-1  | Mounted BLIP
webui-docker-auto-1  | Mounted Hypernetworks
webui-docker-auto-1  | Mounted VAE
webui-docker-auto-1  | Mounted GFPGAN
webui-docker-auto-1  | Mounted RealESRGAN
webui-docker-auto-1  | Mounted Deepdanbooru
webui-docker-auto-1  | Mounted ScuNET
webui-docker-auto-1  | Mounted ControlNet
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted StableDiffusion
webui-docker-auto-1  | Mounted embeddings
webui-docker-auto-1  | Mounted ESRGAN
webui-docker-auto-1  | Mounted config.json
webui-docker-auto-1  | Mounted SwinIR
webui-docker-auto-1  | Mounted Lora
webui-docker-auto-1  | Mounted MiDaS
webui-docker-auto-1  | Mounted styles.csv
webui-docker-auto-1  | Mounted ui-config.json
webui-docker-auto-1  | Mounted BSRGAN
webui-docker-auto-1  | Mounted Codeformer
webui-docker-auto-1  | Mounted extensions
webui-docker-auto-1  | Traceback (most recent call last):
webui-docker-auto-1  |   File "/stable-diffusion-webui/webui.py", line 35, in <module>
webui-docker-auto-1  |     from modules import extra_networks, ui_extra_networks_checkpoints
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 5, in <module>
webui-docker-auto-1  |     from modules import shared, ui_extra_networks, sd_models
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/ui_extra_networks.py", line 8, in <module>
webui-docker-auto-1  |     from modules.images import read_info_from_image
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/images.py", line 21, in <module>
webui-docker-auto-1  |     from modules import sd_samplers, shared, script_callbacks, errors
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers.py", line 1, in <module>
webui-docker-auto-1  |     from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers_compvis.py", line 9, in <module>
webui-docker-auto-1  |     from modules import sd_samplers_common, prompt_parser, shared
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/sd_samplers_common.py", line 5, in <module>
webui-docker-auto-1  |     from modules import devices, processing, images, sd_vae_approx
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/processing.py", line 12, in <module>
webui-docker-auto-1  |     import cv2
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
webui-docker-auto-1  |     bootstrap()
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
webui-docker-auto-1  |     native_module = importlib.import_module("cv2")
webui-docker-auto-1  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
webui-docker-auto-1  |     return _bootstrap._gcd_import(name[level:], package, level)
webui-docker-auto-1  | ImportError: libGL.so.1: cannot open shared object file: No such file or directory
webui-docker-auto-1 exited with code 1

Additional information

No response

That-Dude avatar May 15 '23 15:05 That-Dude

I managed to fix this by adding:

apt install libglu1-mesa-dev -y

to the file ./services/AUTOMATIC1111/entrypoint.sh

I'm sure this is not the correct way to fix it, but it works ....

That-Dude avatar May 15 '23 15:05 That-Dude

https://stackoverflow.com/questions/55313610/importerror-libgl-so-1-cannot-open-shared-object-file-no-such-file-or-directo

Even though the above solutions work. But their package sizes are quite big. libGL.so.1 is provided by package libgl1. So the following code is sufficient.

apt-get update && apt-get install libgl1

2 poeple say it works for them had same issue other stuff it works

s-b-repo avatar May 15 '23 18:05 s-b-repo