AbdBarho / stable-diffusion-webui-docker

Easy Docker setup for Stable Diffusion with user-friendly UI
Other
6.8k stars 1.14k forks source link

Automatic UI and Invoke fail to start (throwing exceptions) #699

Open kolaente opened 6 months ago

kolaente commented 6 months ago

Has this issue been opened before?

Describe the bug

After running the package fine for a few months, when since using it today it won't start any more and crash with an exception.

InvokeAI:

invoke-1  | Mounted .cache
invoke-1  | Mounted GFPGANv1.4.pth
invoke-1  | Mounted RealESRGAN
invoke-1  | Mounted Codeformer
invoke-1  | Mounted GFPGAN
invoke-1  | mkdir: created directory '/data/.cache/invoke'
invoke-1  | mkdir: created directory '/data/.cache/invoke/ldm/'
invoke-1  | Mounted ldm
invoke-1  | Loading Python libraries...
invoke-1  |
invoke-1  | Traceback (most recent call last):
invoke-1  |   File "/opt/conda/bin/invokeai-configure", line 5, in <module>
invoke-1  |     from ldm.invoke.config.invokeai_configure import main
invoke-1  |   File "/InvokeAI/ldm/invoke/config/invokeai_configure.py", line 26, in <module>
invoke-1  |     from diffusers import AutoencoderKL
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/__init__.py", line 58, in <module>
invoke-1  |     from .pipelines import (
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/__init__.py", line 45, in <module>
invoke-1  |     from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/__init__.py", line 32, in <module>
invoke-1  |     from .pipeline_alt_diffusion import AltDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py", line 30, in <module>
invoke-1  |     from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/__init__.py", line 96, in <module>
invoke-1  |     from .pipeline_stable_diffusion_k_diffusion import StableDiffusionKDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py", line 19, in <module>
invoke-1  |     from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/__init__.py", line 1, in <module>
invoke-1  |     from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/config.py", line 8, in <module>
invoke-1  |     from . import augmentation, layers, models, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/layers.py", line 10, in <module>
invoke-1  |     from . import sampling, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/sampling.py", line 10, in <module>
invoke-1  |     from . import utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/utils.py", line 15, in <module>
invoke-1  |     from torchvision.transforms import functional as TF
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/torchvision/__init__.py", line 6, in <module>
invoke-1  |     from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 4, in <module>
invoke-1  |     import torch._custom_ops
invoke-1  | ModuleNotFoundError: No module named 'torch._custom_ops'

auto:

auto-1  | Installing extension dependencies (if any)
auto-1  | Traceback (most recent call last):
auto-1  |   File "/stable-diffusion-webui/./extensions/sd-face-editor/install.py", line 2, in <module>
auto-1  |     from scripts.io.util import load_classes_from_directory
auto-1  |   File "/data/config/auto/extensions/sd-face-editor/scripts/io/util.py", line 6, in <module>
auto-1  |     import modules.scripts as scripts
auto-1  |   File "/stable-diffusion-webui/modules/scripts.py", line 8, in <module>
auto-1  |     import gradio as gr
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
auto-1  |     import gradio.components as components
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
auto-1  |     from gradio.components.annotated_image import AnnotatedImage
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 13, in <module>
auto-1  |     from gradio.components.base import IOComponent, _Keywords
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/base.py", line 20, in <module>
auto-1  |     from fastapi import UploadFile
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/__init__.py", line 7, in <module>
auto-1  |     from .applications import FastAPI as FastAPI
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/applications.py", line 15, in <module>
auto-1  |     from fastapi import routing
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 22, in <module>
auto-1  |     from fastapi import params
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/params.py", line 4, in <module>
auto-1  |     from pydantic.fields import FieldInfo, Undefined
auto-1  | ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/opt/conda/lib/python3.10/site-packages/pydantic/fields.py)
auto-1  |
auto-1  | During handling of the above exception, another exception occurred:
auto-1  |
auto-1  | Traceback (most recent call last):
auto-1  |   File "/stable-diffusion-webui/./extensions/sd-face-editor/install.py", line 8, in <module>
auto-1  |     from scripts.io.util import load_classes_from_directory
auto-1  |   File "/data/config/auto/extensions/sd-face-editor/scripts/io/util.py", line 6, in <module>
auto-1  |     import modules.scripts as scripts
auto-1  |   File "/stable-diffusion-webui/modules/scripts.py", line 8, in <module>
auto-1  |     import gradio as gr
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
auto-1  |     import gradio.components as components
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
auto-1  |     from gradio.components.annotated_image import AnnotatedImage
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 13, in <module>
auto-1  |     from gradio.components.base import IOComponent, _Keywords
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/base.py", line 20, in <module>
auto-1  |     from fastapi import UploadFile
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/__init__.py", line 7, in <module>
auto-1  |     from .applications import FastAPI as FastAPI
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/applications.py", line 15, in <module>
auto-1  |     from fastapi import routing
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 22, in <module>
auto-1  |     from fastapi import params
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/params.py", line 4, in <module>
auto-1  |     from pydantic.fields import FieldInfo, Undefined
auto-1  | ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/opt/conda/lib/python3.10/site-packages/pydantic/fields.py)

I started it using docker compose --profile auto up.

It ran an automatic update inside the container when I started it.

Updated to the latest version of this git repo, f1bf3b09438b0d2aad1bc30359107fc1e4365a09, still the same issue.

Which UI

auto seems to be broken, invoke works.

Hardware / Software

Abdullah-Tauqeer01 commented 6 months ago

I am also facing the same problem

tetraphobia commented 5 months ago

I'm having the same error as OP, but only for the invoke profile. Auto works for me. Probably a NixOS issue?

OS: NixOS OS version: 24.05 Docker Version: 24.0.9 Docker Compose version: 2.27.0 Repo version: f1bf3b0 RAM: 32 GB GPU: RTX 3090 Ti, 24 GB VRAM

ngapaillard commented 5 months ago

same here on the first boot with

docker compose --profile invoke up --build

invoke-1 | Mounted .cache invoke-1 | Mounted GFPGANv1.4.pth invoke-1 | Mounted RealESRGAN invoke-1 | mkdir: created directory '/data/models/Codeformer/' invoke-1 | Mounted Codeformer invoke-1 | Mounted GFPGAN invoke-1 | mkdir: created directory '/data/.cache/invoke' invoke-1 | mkdir: created directory '/data/.cache/invoke/ldm/' invoke-1 | Mounted ldm invoke-1 | Loading Python libraries... invoke-1 | invoke-1 | Traceback (most recent call last): invoke-1 | File "/opt/conda/bin/invokeai-configure", line 5, in invoke-1 | from ldm.invoke.config.invokeai_configure import main invoke-1 | File "/InvokeAI/ldm/invoke/config/invokeai_configure.py", line 26, in invoke-1 | from diffusers import AutoencoderKL invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/init.py", line 58, in invoke-1 | from .pipelines import ( invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/init.py", line 45, in invoke-1 | from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/init.py", line 32, in invoke-1 | from .pipeline_alt_diffusion import AltDiffusionPipeline invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py", line 30, in invoke-1 | from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/init.py", line 96, in invoke-1 | from .pipeline_stable_diffusion_k_diffusion import StableDiffusionKDiffusionPipeline invoke-1 | File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py", line 19, in invoke-1 | from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser invoke-1 | File "/opt/conda/lib/python3.10/site-packages/k_diffusion/init.py", line 1, in invoke-1 | from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils invoke-1 | File "/opt/conda/lib/python3.10/site-packages/k_diffusion/config.py", line 8, in invoke-1 | from . import augmentation, layers, models, utils invoke-1 | File "/opt/conda/lib/python3.10/site-packages/k_diffusion/layers.py", line 10, in invoke-1 | from . import sampling, utils invoke-1 | File "/opt/conda/lib/python3.10/site-packages/k_diffusion/sampling.py", line 10, in invoke-1 | from . import utils invoke-1 | File "/opt/conda/lib/python3.10/site-packages/k_diffusion/utils.py", line 15, in invoke-1 | from torchvision.transforms import functional as TF invoke-1 | File "/opt/conda/lib/python3.10/site-packages/torchvision/init.py", line 6, in invoke-1 | from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils invoke-1 | File "/opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 4, in invoke-1 | import torch._custom_ops invoke-1 | ModuleNotFoundError: No module named 'torch._custom_ops'

OS: ubuntu server 24.04 LTS ARCH: X86_64 Docker version 26.1.4, build 5650f9b GPU: GeForce GT 640M LE

altane commented 5 months ago

Same issue here

xiangnansu commented 5 months ago

I encountered the same issue and after updating Docker, only InvokeAI is still there.

SolninjaA commented 5 months ago

Edit: For now, I have fixed the problem by using the auto profile instead of invoke.

I'm facing the same issue by running sudo docker compose --profile invoke up --build. I'm using the invoke profile.

invoke-1  | Traceback (most recent call last):
invoke-1  |   File "/opt/conda/bin/invokeai-configure", line 5, in <module>
invoke-1  |     from ldm.invoke.config.invokeai_configure import main
invoke-1  |   File "/InvokeAI/ldm/invoke/config/invokeai_configure.py", line 26, in <module>
invoke-1  |     from diffusers import AutoencoderKL
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/__init__.py", line 58, in <module>
invoke-1  |     from .pipelines import (
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/__init__.py", line 45, in <module>
invoke-1  |     from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/__init__.py", line 32, in <module>
invoke-1  |     from .pipeline_alt_diffusion import AltDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py", line 30, in <module>
invoke-1  |     from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/__init__.py", line 96, in <module>
invoke-1  |     from .pipeline_stable_diffusion_k_diffusion import StableDiffusionKDiffusionPipeline
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py", line 19, in <module>
invoke-1  |     from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/__init__.py", line 1, in <module>
invoke-1  |     from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/config.py", line 8, in <module>
invoke-1  |     from . import augmentation, layers, models, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/layers.py", line 10, in <module>
invoke-1  |     from . import sampling, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/sampling.py", line 10, in <module>
invoke-1  |     from . import utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/k_diffusion/utils.py", line 15, in <module>
invoke-1  |     from torchvision.transforms import functional as TF
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/torchvision/__init__.py", line 6, in <module>
invoke-1  |     from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
invoke-1  |   File "/opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 4, in <module>
invoke-1  |     import torch._custom_ops
invoke-1  | ModuleNotFoundError: No module named 'torch._custom_ops'
invoke-1 exited with code 1
Sammypoppins commented 5 months ago

I'm facing the same issue by running sudo docker compose --profile invoke up --build. I'm using the invoke profile.

SolninjaA commented 5 months ago

I'm facing the same issue by running sudo docker compose --profile invoke up --build. I'm using the invoke profile.

In case this helps, when I use the auto profile instead of invoke the problem seems to be fixed.

dajix350 commented 5 months ago

I experienced this issue too on the auto and invoke profiles. It first started occurring when I restarted after installing an extension in auto (from within the UI), but has persisted even after removing that extension's folder. Any devs, feel free to ping me if you need someone to test a potential fix.

❯ docker compose --profile auto up --build
[+] Building 2.8s (25/25) FINISHED                                                                                                                                       docker:default
 => [auto internal] load build definition from Dockerfile                                                                                                                          0.0s
 => => transferring dockerfile: 2.96kB                                                                                                                                             0.0s
 => [auto internal] load metadata for docker.io/pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime                                                                                      2.7s
 => [auto internal] load metadata for docker.io/alpine/git:2.36.2                                                                                                                  2.6s
 => [auto internal] load .dockerignore                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                    0.0s
 => [auto download 1/9] FROM docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84                                                   0.0s
 => [auto internal] load build context                                                                                                                                             0.0s
 => => transferring context: 7.98kB                                                                                                                                                0.0s
 => [auto stage-1  1/11] FROM docker.io/pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime@sha256:0279f7aa29974bf64e61d0ff6e979b41a249b3662a46e30778dbf80b8c99c361                      0.0s
 => CACHED [auto stage-1  2/11] RUN --mount=type=cache,target=/var/cache/apt   apt-get update &&   apt-get install -y fonts-dejavu-core rsync git jq moreutils aria2   ffmpeg lib  0.0s
 => CACHED [auto stage-1  3/11] RUN --mount=type=cache,target=/root/.cache/pip   git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git &&   cd stable-diffusion-w  0.0s
 => CACHED [auto download 2/9] COPY clone.sh /clone.sh                                                                                                                             0.0s
 => CACHED [auto download 3/9] RUN . /clone.sh stable-diffusion-webui-assets https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git 6f7db241d2f8ba7457bac5ca9753331f0  0.0s
 => CACHED [auto download 4/9] RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf   && rm  0.0s
 => CACHED [auto download 5/9] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9                                                0.0s
 => CACHED [auto download 6/9] RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c                                   0.0s
 => CACHED [auto download 7/9] RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59cf1b11c9                     0.0s
 => CACHED [auto download 8/9] RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7f5657c19f                        0.0s
 => CACHED [auto download 9/9] RUN . /clone.sh stable-diffusion-webui-assets https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets 6f7db241d2f8ba7457bac5ca9753331f0c266  0.0s
 => CACHED [auto stage-1  4/11] COPY --from=download /repositories/ /stable-diffusion-webui/repositories/                                                                          0.0s
 => CACHED [auto stage-1  5/11] RUN mkdir /stable-diffusion-webui/interrogate && cp /stable-diffusion-webui/repositories/clip-interrogator/clip_interrogator/data/* /stable-diffu  0.0s
 => CACHED [auto stage-1  6/11] RUN --mount=type=cache,target=/root/.cache/pip   pip install pyngrok xformers==0.0.26.post1   git+https://github.com/TencentARC/GFPGAN.git@8d2447  0.0s
 => CACHED [auto stage-1  7/11] RUN apt-get -y install libgoogle-perftools-dev && apt-get clean                                                                                    0.0s
 => CACHED [auto stage-1  8/11] COPY . /docker                                                                                                                                     0.0s
 => CACHED [auto stage-1  9/11] RUN   sed -i 's/in_app_dir = .*/in_app_dir = True/g' /opt/conda/lib/python3.10/site-packages/gradio/routes.py &&   git config --global --add safe  0.0s
 => CACHED [auto stage-1 10/11] WORKDIR /stable-diffusion-webui                                                                                                                    0.0s
 => [auto] exporting to image                                                                                                                                                      0.0s
 => => exporting layers                                                                                                                                                            0.0s
 => => writing image sha256:e7dae5fbed7321a4ab59bfbe46dbec65a2317a6ba91dec798c135d96f8d7e0f5                                                                                       0.0s
 => => naming to docker.io/library/sd-auto:78                                                                                                                                      0.0s
[+] Running 1/0
 ✔ Container webui-docker-auto-1  Created                                                                                                                                          0.0s 
Attaching to auto-1
auto-1  | /stable-diffusion-webui
auto-1  | total 732K
auto-1  | drwxr-xr-x 1 root root  294 Jun 15 05:39 .
auto-1  | drwxr-xr-x 1 root root  102 Jun 15 05:12 ..
auto-1  | -rw-r--r-- 1 root root   48 Jun 15 05:08 .eslintignore
auto-1  | -rw-r--r-- 1 root root 3.4K Jun 15 05:08 .eslintrc.js
auto-1  | drwxr-xr-x 1 root root  156 Jun 15 05:08 .git
auto-1  | -rw-r--r-- 1 root root   55 Jun 15 05:08 .git-blame-ignore-revs
auto-1  | drwxr-xr-x 1 root root   94 Jun 15 05:08 .github
auto-1  | -rw-r--r-- 1 root root  521 Jun 15 05:08 .gitignore
auto-1  | -rw-r--r-- 1 root root  119 Jun 15 05:08 .pylintrc
auto-1  | -rw-r--r-- 1 root root  84K Jun 15 05:08 CHANGELOG.md
auto-1  | -rw-r--r-- 1 root root  243 Jun 15 05:08 CITATION.cff
auto-1  | -rw-r--r-- 1 root root  657 Jun 15 05:08 CODEOWNERS
auto-1  | -rw-r--r-- 1 root root  35K Jun 15 05:08 LICENSE.txt
auto-1  | -rw-r--r-- 1 root root  13K Jun 15 05:08 README.md
auto-1  | drwxr-xr-x 1 root root   44 Jun 15 05:12 __pycache__
auto-1  | -rw-r--r-- 1 root root  146 Jun 15 05:08 _typos.toml
auto-1  | drwxr-xr-x 1 root root   40 Jun 15 05:36 cache
auto-1  | lrwxrwxrwx 1 root root   29 Jun 15 05:39 config.json -> /data/config/auto/config.json
auto-1  | lrwxrwxrwx 1 root root   31 Jun 15 05:39 config_states -> /data/config/auto/config_states
auto-1  | drwxr-xr-x 1 root root  288 Jun 15 05:08 configs
auto-1  | lrwxrwxrwx 1 root root   16 Jun 15 05:39 embeddings -> /data/embeddings
auto-1  | -rw-r--r-- 1 root root  167 Jun 15 05:08 environment-wsl2.yaml
auto-1  | lrwxrwxrwx 1 root root   28 Jun 15 05:39 extensions -> /data/config/auto/extensions
auto-1  | drwxr-xr-x 1 root root  222 Jun 15 05:08 extensions-builtin
auto-1  | drwxr-xr-x 1 root root  630 Jun 15 05:08 html
auto-1  | drwxr-xr-x 1 root root  116 Jun 15 05:10 interrogate
auto-1  | drwxr-xr-x 1 root root  764 Jun 15 05:08 javascript
auto-1  | -rw-r--r-- 1 root root 1.3K Jun 15 05:08 launch.py
auto-1  | drwxr-xr-x 1 root root   62 Jun 15 05:08 localizations
auto-1  | lrwxrwxrwx 1 root root   12 Jun 15 05:39 models -> /data/models
auto-1  | drwxr-xr-x 1 root root  136 Jun 15 05:12 modules
auto-1  | -rw-r--r-- 1 root root  185 Jun 15 05:08 package.json
auto-1  | -rw-r--r-- 1 root root  352 Jun 15 05:24 params.txt
auto-1  | -rw-r--r-- 1 root root  841 Jun 15 05:08 pyproject.toml
auto-1  | drwxr-xr-x 1 root root  134 Jun 15 05:12 repositories
auto-1  | -rw-r--r-- 1 root root   49 Jun 15 05:08 requirements-test.txt
auto-1  | -rw-r--r-- 1 root root  371 Jun 15 05:08 requirements.txt
auto-1  | -rw-r--r-- 1 root root   42 Jun 15 05:08 requirements_npu.txt
auto-1  | -rw-r--r-- 1 root root  645 Jun 15 05:08 requirements_versions.txt
auto-1  | -rw-r--r-- 1 root root 411K Jun 15 05:08 screenshot.png
auto-1  | -rw-r--r-- 1 root root 6.1K Jun 15 05:08 script.js
auto-1  | drwxr-xr-x 1 root root   22 Jun 15 05:12 scripts
auto-1  | -rw-r--r-- 1 root root  43K Jun 15 05:08 style.css
auto-1  | lrwxrwxrwx 1 root root   28 Jun 15 05:39 styles.csv -> /data/config/auto/styles.csv
auto-1  | drwxr-xr-x 1 root root  284 Jun 15 05:08 test
auto-1  | drwxr-xr-x 1 root root  168 Jun 15 05:08 textual_inversion_templates
auto-1  | drwxr-xr-x 1 root root    0 Jun 15 05:30 tmp
auto-1  | lrwxrwxrwx 1 root root   32 Jun 15 05:39 ui-config.json -> /data/config/auto/ui-config.json
auto-1  | -rw-r--r-- 1 root root  670 Jun 15 05:08 webui-macos-env.sh
auto-1  | -rw-r--r-- 1 root root   84 Jun 15 05:08 webui-user.bat
auto-1  | -rw-r--r-- 1 root root 1.4K Jun 15 05:08 webui-user.sh
auto-1  | -rw-r--r-- 1 root root 2.3K Jun 15 05:08 webui.bat
auto-1  | -rw-r--r-- 1 root root 5.3K Jun 15 05:08 webui.py
auto-1  | -rwxr-xr-x 1 root root  11K Jun 15 05:08 webui.sh
auto-1  | Mounted .cache
auto-1  | Mounted config_states
auto-1  | Mounted .cache
auto-1  | Mounted embeddings
auto-1  | Mounted config.json
auto-1  | Mounted models
auto-1  | Mounted styles.csv
auto-1  | Mounted ui-config.json
auto-1  | Mounted extensions
auto-1  | Installing extension dependencies (if any)
auto-1  | Requirement already satisfied: insightface==0.7.3 in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.7.3)
auto-1  | Requirement already satisfied: onnx==1.14.0 in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 2)) (1.14.0)
auto-1  | Requirement already satisfied: onnxruntime==1.15.0 in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (1.15.0)
auto-1  | Requirement already satisfied: opencv-python==4.7.0.72 in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 4)) (4.7.0.72)
auto-1  | Requirement already satisfied: ifnude in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 5)) (0.0.3)
auto-1  | Requirement already satisfied: cython in /opt/conda/lib/python3.10/site-packages (from -r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 6)) (3.0.10)
auto-1  | Requirement already satisfied: numpy in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.26.2)
auto-1  | Requirement already satisfied: tqdm in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (4.65.0)
auto-1  | Requirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.31.0)
auto-1  | Requirement already satisfied: matplotlib in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.9.0)
auto-1  | Requirement already satisfied: Pillow in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (9.5.0)
auto-1  | Requirement already satisfied: scipy in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.13.1)
auto-1  | Requirement already satisfied: scikit-learn in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.5.0)
auto-1  | Requirement already satisfied: scikit-image in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.21.0)
auto-1  | Requirement already satisfied: easydict in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.13)
auto-1  | Requirement already satisfied: albumentations in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.4.8)
auto-1  | Requirement already satisfied: prettytable in /opt/conda/lib/python3.10/site-packages (from insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.10.0)
auto-1  | Requirement already satisfied: protobuf>=3.20.2 in /opt/conda/lib/python3.10/site-packages (from onnx==1.14.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 2)) (3.20.3)
auto-1  | Requirement already satisfied: typing-extensions>=3.6.2.1 in /opt/conda/lib/python3.10/site-packages (from onnx==1.14.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 2)) (4.11.0)
auto-1  | Requirement already satisfied: coloredlogs in /opt/conda/lib/python3.10/site-packages (from onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (15.0.1)
auto-1  | Requirement already satisfied: flatbuffers in /opt/conda/lib/python3.10/site-packages (from onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (24.3.25)
auto-1  | Requirement already satisfied: packaging in /opt/conda/lib/python3.10/site-packages (from onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (23.2)
auto-1  | Requirement already satisfied: sympy in /opt/conda/lib/python3.10/site-packages (from onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (1.12)
auto-1  | Requirement already satisfied: opencv-python-headless>=4.5.1.48 in /opt/conda/lib/python3.10/site-packages (from ifnude->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 5)) (4.10.0.82)
auto-1  | Requirement already satisfied: PyYAML in /opt/conda/lib/python3.10/site-packages (from albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (6.0.1)
auto-1  | Requirement already satisfied: pydantic>=2.7.0 in /opt/conda/lib/python3.10/site-packages (from albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.7.4)
auto-1  | Requirement already satisfied: albucore>=0.0.4 in /opt/conda/lib/python3.10/site-packages (from albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.0.10)
auto-1  | Requirement already satisfied: networkx>=2.8 in /opt/conda/lib/python3.10/site-packages (from scikit-image->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.1)
auto-1  | Requirement already satisfied: imageio>=2.27 in /opt/conda/lib/python3.10/site-packages (from scikit-image->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.34.1)
auto-1  | Requirement already satisfied: tifffile>=2022.8.12 in /opt/conda/lib/python3.10/site-packages (from scikit-image->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2024.5.22)
auto-1  | Requirement already satisfied: PyWavelets>=1.1.1 in /opt/conda/lib/python3.10/site-packages (from scikit-image->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.6.0)
auto-1  | Requirement already satisfied: lazy_loader>=0.2 in /opt/conda/lib/python3.10/site-packages (from scikit-image->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.4)
auto-1  | Requirement already satisfied: joblib>=1.2.0 in /opt/conda/lib/python3.10/site-packages (from scikit-learn->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.4.2)
auto-1  | Requirement already satisfied: threadpoolctl>=3.1.0 in /opt/conda/lib/python3.10/site-packages (from scikit-learn->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.5.0)
auto-1  | Requirement already satisfied: humanfriendly>=9.1 in /opt/conda/lib/python3.10/site-packages (from coloredlogs->onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (10.0)
auto-1  | Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.2.1)
auto-1  | Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.12.1)
auto-1  | Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (4.53.0)
auto-1  | Requirement already satisfied: kiwisolver>=1.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.4.5)
auto-1  | Requirement already satisfied: pyparsing>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.1.2)
auto-1  | Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.9.0.post0)
auto-1  | Requirement already satisfied: wcwidth in /opt/conda/lib/python3.10/site-packages (from prettytable->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.2.13)
auto-1  | Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.0.4)
auto-1  | Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (3.4)
auto-1  | Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.1.0)
auto-1  | Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2024.2.2)
auto-1  | Requirement already satisfied: mpmath>=0.19 in /opt/conda/lib/python3.10/site-packages (from sympy->onnxruntime==1.15.0->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 3)) (1.3.0)
auto-1  | Requirement already satisfied: tomli>=2.0.1 in /opt/conda/lib/python3.10/site-packages (from albucore>=0.0.4->albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.0.1)
auto-1  | Requirement already satisfied: annotated-types>=0.4.0 in /opt/conda/lib/python3.10/site-packages (from pydantic>=2.7.0->albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (0.7.0)
auto-1  | Requirement already satisfied: pydantic-core==2.18.4 in /opt/conda/lib/python3.10/site-packages (from pydantic>=2.7.0->albumentations->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (2.18.4)
auto-1  | Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib->insightface==0.7.3->-r /data/config/auto/extensions/sd-webui-roop/requirements.txt (line 1)) (1.16.0)
auto-1  | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
auto-1  | Traceback (most recent call last):
auto-1  |   File "/stable-diffusion-webui/webui.py", line 13, in <module>
auto-1  |     initialize.imports()
auto-1  |   File "/stable-diffusion-webui/modules/initialize.py", line 23, in imports
auto-1  |     import gradio  # noqa: F401
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
auto-1  |     import gradio.components as components
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
auto-1  |     from gradio.components.annotated_image import AnnotatedImage
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 13, in <module>
auto-1  |     from gradio.components.base import IOComponent, _Keywords
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/base.py", line 20, in <module>
auto-1  |     from fastapi import UploadFile
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/__init__.py", line 7, in <module>
auto-1  |     from .applications import FastAPI as FastAPI
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/applications.py", line 15, in <module>
auto-1  |     from fastapi import routing
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 22, in <module>
auto-1  |     from fastapi import params
auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/params.py", line 4, in <module>
auto-1  |     from pydantic.fields import FieldInfo, Undefined
auto-1  | ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/opt/conda/lib/python3.10/site-packages/pydantic/fields.py)
auto-1 exited with code 1

OS: Arch Linux Docker version: 26.1.4 Docker Compose version: 2.27.1 RAM: 16 GB VRAM: 6 GB GPU: GTX 1660 Super

shuther commented 5 months ago

same issue with auto profile, maybe something is broken upstream?

webui-docker-auto-1  | Successfully installed opencv-python-4.7.0.72
webui-docker-auto-1  | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
webui-docker-auto-1  |
webui-docker-auto-1  | Traceback (most recent call last):
webui-docker-auto-1  |   File "/stable-diffusion-webui/webui.py", line 13, in <module>
webui-docker-auto-1  |     initialize.imports()
webui-docker-auto-1  |   File "/stable-diffusion-webui/modules/initialize.py", line 23, in imports
webui-docker-auto-1  |     import gradio  # noqa: F401
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
webui-docker-auto-1  |     import gradio.components as components
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
webui-docker-auto-1  |     from gradio.components.annotated_image import AnnotatedImage
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 13, in <module>
webui-docker-auto-1  |     from gradio.components.base import IOComponent, _Keywords
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/gradio/components/base.py", line 20, in <module>
webui-docker-auto-1  |     from fastapi import UploadFile
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/__init__.py", line 7, in <module>
webui-docker-auto-1  |     from .applications import FastAPI as FastAPI
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/applications.py", line 15, in <module>
webui-docker-auto-1  |     from fastapi import routing
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 22, in <module>
webui-docker-auto-1  |     from fastapi import params
webui-docker-auto-1  |   File "/opt/conda/lib/python3.10/site-packages/fastapi/params.py", line 4, in <module>
webui-docker-auto-1  |     from pydantic.fields import FieldInfo, Undefined
webui-docker-auto-1  | ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/opt/conda/lib/python3.10/site-packages/pydantic/fields.py)
webui-docker-auto-1 exited with code 1
iorlas commented 5 months ago

Same problem

RyanGreenup commented 4 months ago

I was hitting this issue as well, I needed to update to the newest v1 pydantic. First I disabled all the extensions and then:

  1. Change the Entrypoint so we can jump inside the container

    1. Edit the entrypoint.sh

      nvim services/AUTOMATIC1111/entrypoint.sh
    2. Add the following at the beginning of the script:

      tail -f /dev/null

      This will hang it so we can jump inside

  2. Jump inside the container

    docker compose --profile auto exec -it auto /bin/bash
  3. Update pydantic once inside the container:

    pip install -U pydantic==1