AbdBarho / stable-diffusion-webui-docker

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

After building to run, get 12 file errors and ImportError #729

Open F1zzyD opened 2 months ago

F1zzyD commented 2 months ago

Has this issue been opened before?

Describe the bug

Followed the directions to install using docker. Step two of building and running fails with the following output during a clean install: auto-1 | Traceback (most recent call last): auto-1 | File "/stable-diffusion-webui/webui.py", line 13, in 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 auto-1 | import gradio.components as components auto-1 | File "/opt/conda/lib/python3.10/site-packages/gradio/components/init.py", line 3, in auto-1 | from gradio.components.bar_plot import BarPlot auto-1 | File "/opt/conda/lib/python3.10/site-packages/gradio/components/bar_plot.py", line 7, in auto-1 | import altair as alt auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/init.py", line 650, in auto-1 | from altair.vegalite import auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/vegalite/init.py", line 2, in auto-1 | from .v5 import auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/vegalite/v5/init.py", line 2, in auto-1 | from altair.expr.core import datum auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/expr/init.py", line 7, in auto-1 | from altair.expr.core import ConstExpression, FunctionExpression auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/expr/core.py", line 6, in auto-1 | from altair.utils import SchemaBase auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/utils/init.py", line 14, in auto-1 | from .plugin_registry import PluginRegistry auto-1 | File "/opt/conda/lib/python3.10/site-packages/altair/utils/plugin_registry.py", line 6, in auto-1 | from typing_extensions import TypeAliasType, TypeIs, TypeVar auto-1 | ImportError: cannot import name 'TypeIs' from 'typing_extensions' (/opt/conda/lib/python3.10/site-packages/typing_extensions.py)

Which UI

Auto

Hardware / Software

Steps to Reproduce

  1. Go to the install guide
  2. Click on follow step 1 with no error.
  3. Follow step two to receive error.

Additional context Just really frustrating to see that all guides on how to install Stable Diffusion WebUI are either outdated or broken for Linux. Can't seem to find anything that works.

Jonpro03 commented 2 months ago

This might actually be a AUTOMATIC1111 problem, but I worked around it by adding pip install --upgrade typing-extensions to services/AUTOMATIC1111/Dockerfile right after the existing requirements file install.

WORKDIR /
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 v1.9.4 && \
  pip install -r requirements_versions.txt && \
  pip install --upgrade typing-extensions

again, not a fix but will unblock anyone else dealing with this

epsilonion-liam commented 1 month ago

go to the services/AUTOMATIC1111 directory in the cloned repo and add

the walk around to that Dockerfile

got a little confused there lol ty for the walkaround.. :P does not take a lot to confuse me these days (old git here).