vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.36k stars 382 forks source link

[Issue]: Import Error during a fresh install: "cannot import name 'Doc' from 'typing_extensions'" #2337

Closed 4joeknight4 closed 9 months ago

4joeknight4 commented 9 months ago

Issue Description

A fresh install using git clone, ran "webui.bat --debug", and then it stalls out on:

"ImportError: cannot import name 'Doc' from 'typing_extensions' (H:\automatic\venv\lib\site-packages\typing_extensions.py)"

I closed the window and ran webui.bat again with the same results. I checked previous issue reports and found several with no solution.

Version Platform Description

Version: app=sd.next updated=2023-10-18 hash=f6486496 Platform: arch=AMD64 cpu=AMD64 Family 25 Model 33 Stepping 2 NVIDIA 4090 system=Windows-10-10.0.19045-SP0 python=3.10.11 Firefox 118.0.2

Relevant log output

Microsoft Windows [Version 10.0.19045.3516]
(c) Microsoft Corporation. All rights reserved.

C:\Windows\system32>H:

H:\>git clone https://github.com/vladmandic/automatic
Cloning into 'automatic'...
remote: Enumerating objects: 33191, done.
remote: Counting objects: 100% (554/554), done.
remote: Compressing objects: 100% (251/251), done.
remote: Total 33191 (delta 361), reused 470 (delta 300), pack-reused 32637
Receiving objects: 100% (33191/33191), 41.07 MiB | 27.50 MiB/s, done.
Resolving deltas: 100% (23854/23854), done.

H:\>cd automatic

H:\automatic>webui.bat --debug
Using python: "C:\Users\Joey\AppData\Local\Programs\Python\Python310\python.exe"
Creating VENV: H:\automatic\venv
Using VENV: H:\automatic\venv
06:54:36-019657 DEBUG    Logger: file=H:\automatic\sdnext.log level=10 size=0 mode=create
06:54:36-023659 INFO     Starting SD.Next
06:54:36-024661 INFO     Python 3.10.11 on Windows
06:54:36-124752 INFO     Version: app=sd.next updated=2023-10-18 hash=f6486496
                         url=https://github.com/vladmandic/automatic/tree/master
06:54:36-154778 INFO     Platform: arch=AMD64 cpu=AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD system=Windows
                         release=Windows-10-10.0.19045-SP0 python=3.10.11
06:54:36-157781 DEBUG    Setting environment tuning
06:54:36-159783 DEBUG    Torch overrides: cuda=False rocm=False ipex=False diml=False openvino=False
06:54:36-160784 DEBUG    Torch allowed: cuda=True rocm=True ipex=True diml=True openvino=True
06:54:36-162786 INFO     nVidia CUDA toolkit detected: nvidia-smi present
06:54:36-163787 INFO     Installing torch - this may take a while
06:54:36-164788 DEBUG    Package version not found: torch
06:54:36-165789 DEBUG    Package version not found: torchvision
06:54:36-166790 INFO     Installing package: torch torchvision --index-url https://download.pytorch.org/whl/cu121
06:54:36-167791 DEBUG    Running pip: install --upgrade torch torchvision --index-url
                         https://download.pytorch.org/whl/cu121
06:55:50-943676 DEBUG    Repository update time: Wed Oct 18 06:17:38 2023
06:55:50-945678 INFO     Verifying requirements
06:55:50-949681 DEBUG    Package version not found: addict
06:55:50-950682 INFO     Installing package: addict
06:55:50-951683 DEBUG    Running pip: install --upgrade addict
06:55:51-908316 DEBUG    Package version not found: aenum
06:55:51-910319 INFO     Installing package: aenum
06:55:51-911319 DEBUG    Running pip: install --upgrade aenum
06:55:52-780254 DEBUG    Package version not found: aiohttp
06:55:52-781255 INFO     Installing package: aiohttp
06:55:52-782256 DEBUG    Running pip: install --upgrade aiohttp
06:55:54-642946 DEBUG    Package version not found: anyio
06:55:54-643946 INFO     Installing package: anyio
06:55:54-644948 DEBUG    Running pip: install --upgrade anyio
06:55:55-712938 DEBUG    Package version not found: appdirs
06:55:55-713937 INFO     Installing package: appdirs
06:55:55-714931 DEBUG    Running pip: install --upgrade appdirs
06:55:56-419144 DEBUG    Package version not found: astunparse
06:55:56-421147 INFO     Installing package: astunparse
06:55:56-422148 DEBUG    Running pip: install --upgrade astunparse
06:55:57-506414 DEBUG    Package version not found: blendmodes
06:55:57-508416 INFO     Installing package: blendmodes
06:55:57-509418 DEBUG    Running pip: install --upgrade blendmodes
06:55:59-484433 DEBUG    Package version not found: clean-fid
06:55:59-485432 INFO     Installing package: clean-fid
06:55:59-486433 DEBUG    Running pip: install --upgrade clean-fid
06:56:07-559989 DEBUG    Package version not found: easydev
06:56:07-561992 INFO     Installing package: easydev
06:56:07-562993 DEBUG    Running pip: install --upgrade easydev
06:56:08-816652 DEBUG    Package version not found: extcolors
06:56:08-818655 INFO     Installing package: extcolors
06:56:08-819656 DEBUG    Running pip: install --upgrade extcolors
06:56:09-813498 DEBUG    Package version not found: facexlib
06:56:09-814499 INFO     Installing package: facexlib
06:56:09-815500 DEBUG    Running pip: install --upgrade facexlib
06:56:26-726218 DEBUG    Package version not found: filetype
06:56:26-727219 INFO     Installing package: filetype
06:56:26-728219 DEBUG    Running pip: install --upgrade filetype
06:56:27-674155 DEBUG    Package version not found: future
06:56:27-675634 INFO     Installing package: future
06:56:27-676635 DEBUG    Running pip: install --upgrade future
06:56:29-591584 DEBUG    Package version not found: gdown
06:56:29-593588 INFO     Installing package: gdown
06:56:29-594588 DEBUG    Running pip: install --upgrade gdown
06:56:31-088912 DEBUG    Package version not found: gfpgan
06:56:31-089913 INFO     Installing package: gfpgan
06:56:31-090914 DEBUG    Running pip: install --upgrade gfpgan
06:56:44-961706 DEBUG    Package version not found: GitPython
06:56:44-963710 INFO     Installing package: GitPython
06:56:44-964710 DEBUG    Running pip: install --upgrade GitPython
06:56:46-548174 DEBUG    Package version not found: httpcore
06:56:46-550175 INFO     Installing package: httpcore
06:56:46-551177 DEBUG    Running pip: install --upgrade httpcore
06:56:47-858584 DEBUG    Package version not found: inflection
06:56:47-860587 INFO     Installing package: inflection
06:56:47-861588 DEBUG    Running pip: install --upgrade inflection
06:56:48-864740 DEBUG    Package version not found: jsonmerge
06:56:48-866745 INFO     Installing package: jsonmerge
06:56:48-867743 DEBUG    Running pip: install --upgrade jsonmerge
06:56:50-480580 DEBUG    Package version not found: kornia
06:56:50-481580 INFO     Installing package: kornia
06:56:50-482572 DEBUG    Running pip: install --upgrade kornia
06:56:53-665508 DEBUG    Package version not found: lark
06:56:53-667509 INFO     Installing package: lark
06:56:53-668510 DEBUG    Running pip: install --upgrade lark
06:56:54-969773 DEBUG    Package version not found: lmdb
06:56:54-970774 INFO     Installing package: lmdb
06:56:54-971775 DEBUG    Running pip: install --upgrade lmdb
06:56:55-898517 DEBUG    Package version not found: lpips
06:56:55-899518 INFO     Installing package: lpips
06:56:55-900519 DEBUG    Running pip: install --upgrade lpips
06:56:56-957715 DEBUG    Package version not found: omegaconf
06:56:56-958716 INFO     Installing package: omegaconf
06:56:56-959708 DEBUG    Running pip: install --upgrade omegaconf
06:56:58-610670 DEBUG    Package version not found: open-clip-torch
06:56:58-611670 INFO     Installing package: open-clip-torch
06:56:58-612672 DEBUG    Running pip: install --upgrade open-clip-torch
06:57:04-442593 DEBUG    Package version not found: opencv-contrib-python-headless
06:57:04-444597 INFO     Installing package: opencv-contrib-python-headless
06:57:04-445597 DEBUG    Running pip: install --upgrade opencv-contrib-python-headless
06:57:06-349273 DEBUG    Package version not found: piexif
06:57:06-350274 INFO     Installing package: piexif
06:57:06-351275 DEBUG    Running pip: install --upgrade piexif
06:57:07-559564 DEBUG    Package version not found: psutil
06:57:07-561570 INFO     Installing package: psutil
06:57:07-562571 DEBUG    Running pip: install --upgrade psutil
06:57:08-930361 DEBUG    Package version not found: pyyaml
06:57:08-932364 INFO     Installing package: pyyaml
06:57:08-933364 DEBUG    Running pip: install --upgrade pyyaml
06:57:09-997487 DEBUG    Package version not found: resize-right
06:57:09-998489 INFO     Installing package: resize-right
06:57:09-999489 DEBUG    Running pip: install --upgrade resize-right
06:57:11-144875 DEBUG    Package version not found: rich
06:57:11-145875 INFO     Installing package: rich
06:57:11-146877 DEBUG    Running pip: install --upgrade rich
06:57:12-224072 DEBUG    Package version not found: safetensors
06:57:12-225073 INFO     Installing package: safetensors
06:57:12-226074 DEBUG    Running pip: install --upgrade safetensors
06:57:13-289239 DEBUG    Package version not found: scipy
06:57:13-291241 INFO     Installing package: scipy
06:57:13-292242 DEBUG    Running pip: install --upgrade scipy
06:57:14-402791 DEBUG    Package version not found: tb_nightly
06:57:14-404794 INFO     Installing package: tb_nightly
06:57:14-405795 DEBUG    Running pip: install --upgrade tb_nightly
06:57:15-715963 DEBUG    Package version not found: toml
06:57:15-717966 INFO     Installing package: toml
06:57:15-718966 DEBUG    Running pip: install --upgrade toml
06:57:16-796888 DEBUG    Package version not found: torchdiffeq
06:57:16-798891 INFO     Installing package: torchdiffeq
06:57:16-799892 DEBUG    Running pip: install --upgrade torchdiffeq
06:57:18-032184 DEBUG    Package version not found: voluptuous
06:57:18-034187 INFO     Installing package: voluptuous
06:57:18-035187 DEBUG    Running pip: install --upgrade voluptuous
06:57:19-144029 DEBUG    Package version not found: yapf
06:57:19-145030 INFO     Installing package: yapf
06:57:19-146032 DEBUG    Running pip: install --upgrade yapf
06:57:20-190221 DEBUG    Package version not found: scikit-image
06:57:20-192224 INFO     Installing package: scikit-image
06:57:20-193225 DEBUG    Running pip: install --upgrade scikit-image
06:57:21-287267 DEBUG    Package version not found: basicsr
06:57:21-289269 INFO     Installing package: basicsr
06:57:21-290270 DEBUG    Running pip: install --upgrade basicsr
06:57:22-411970 DEBUG    Package version not found: fasteners
06:57:22-412971 INFO     Installing package: fasteners
06:57:22-413972 DEBUG    Running pip: install --upgrade fasteners
06:57:23-625372 DEBUG    Package version not found: dctorch
06:57:23-627375 INFO     Installing package: dctorch
06:57:23-628376 DEBUG    Running pip: install --upgrade dctorch
06:57:24-717823 DEBUG    Package version not found: compel
06:57:24-719827 INFO     Installing package: compel==2.0.2
06:57:24-720827 DEBUG    Running pip: install --upgrade compel==2.0.2
06:57:40-864552 DEBUG    Package version not found: torchsde
06:57:40-865552 INFO     Installing package: torchsde==0.2.6
06:57:40-866553 DEBUG    Running pip: install --upgrade torchsde==0.2.6
06:57:42-649751 DEBUG    Package version not found: typing-extensions
06:57:42-650752 INFO     Installing package: typing-extensions==4.7.1
06:57:42-651753 DEBUG    Running pip: install --upgrade typing-extensions==4.7.1
06:57:44-449941 DEBUG    Package version not found: antlr4-python3-runtime
06:57:44-450941 INFO     Installing package: antlr4-python3-runtime==4.9.3
06:57:44-451943 DEBUG    Running pip: install --upgrade antlr4-python3-runtime==4.9.3
06:57:45-790441 DEBUG    Package version not found: requests
06:57:45-792444 INFO     Installing package: requests==2.31.0
06:57:45-793445 DEBUG    Running pip: install --upgrade requests==2.31.0
06:57:47-309135 DEBUG    Package version not found: tqdm
06:57:47-311138 INFO     Installing package: tqdm==4.66.1
06:57:47-312139 DEBUG    Running pip: install --upgrade tqdm==4.66.1
06:57:48-669369 DEBUG    Package version not found: accelerate
06:57:48-671372 INFO     Installing package: accelerate==0.20.3
06:57:48-672373 DEBUG    Running pip: install --upgrade accelerate==0.20.3
06:57:50-664963 DEBUG    Package version not found: opencv-python-headless
06:57:50-666965 INFO     Installing package: opencv-python-headless==4.7.0.72
06:57:50-667965 DEBUG    Running pip: install --upgrade opencv-python-headless==4.7.0.72
06:57:52-699133 DEBUG    Package version not found: diffusers
06:57:52-701137 INFO     Installing package: diffusers==0.21.4
06:57:52-702137 DEBUG    Running pip: install --upgrade diffusers==0.21.4
06:57:54-094247 DEBUG    Package version not found: einops
06:57:54-096250 INFO     Installing package: einops==0.4.1
06:57:54-097250 DEBUG    Running pip: install --upgrade einops==0.4.1
06:57:55-624732 DEBUG    Package version not found: gradio
06:57:55-626736 INFO     Installing package: gradio==3.43.2
06:57:55-627736 DEBUG    Running pip: install --upgrade gradio==3.43.2
06:58:14-313733 DEBUG    Package version not found: huggingface_hub
06:58:14-315736 INFO     Installing package: huggingface_hub==0.17.1
06:58:14-316736 DEBUG    Running pip: install --upgrade huggingface_hub==0.17.1
06:58:16-643571 DEBUG    Package version not found: numexpr
06:58:16-645262 INFO     Installing package: numexpr==2.8.4
06:58:16-646263 DEBUG    Running pip: install --upgrade numexpr==2.8.4
06:58:18-227395 DEBUG    Package version not found: numpy
06:58:18-228413 INFO     Installing package: numpy==1.24.4
06:58:18-229415 DEBUG    Running pip: install --upgrade numpy==1.24.4
06:58:24-437266 DEBUG    Package version not found: numba
06:58:24-439268 INFO     Installing package: numba==0.57.1
06:58:24-440268 DEBUG    Running pip: install --upgrade numba==0.57.1
06:58:32-274420 DEBUG    Package version not found: pandas
06:58:32-276422 INFO     Installing package: pandas==1.5.3
06:58:32-277422 DEBUG    Running pip: install --upgrade pandas==1.5.3
06:58:44-532622 DEBUG    Package version not found: protobuf
06:58:44-533719 INFO     Installing package: protobuf==3.20.3
06:58:44-534722 DEBUG    Running pip: install --upgrade protobuf==3.20.3
06:58:46-087131 DEBUG    Package version not found: pytorch_lightning
06:58:46-089134 INFO     Installing package: pytorch_lightning==1.9.4
06:58:46-090135 DEBUG    Running pip: install --upgrade pytorch_lightning==1.9.4
06:58:51-767452 DEBUG    Package version not found: transformers
06:58:51-769456 INFO     Installing package: transformers==4.30.2
06:58:51-770456 DEBUG    Running pip: install --upgrade transformers==4.30.2
06:59:06-042526 DEBUG    Package version not found: tomesd
06:59:06-043967 INFO     Installing package: tomesd==0.1.3
06:59:06-044968 DEBUG    Running pip: install --upgrade tomesd==0.1.3
06:59:07-742878 DEBUG    Package version not found: urllib3
06:59:07-744879 INFO     Installing package: urllib3==1.26.15
06:59:07-745881 DEBUG    Running pip: install --upgrade urllib3==1.26.15
06:59:09-662392 DEBUG    Package version not found: Pillow
06:59:09-663393 INFO     Installing package: Pillow==9.5.0
06:59:09-664394 DEBUG    Running pip: install --upgrade Pillow==9.5.0
06:59:12-153162 DEBUG    Package version not found: timm
06:59:12-154163 INFO     Installing package: timm==0.9.7
06:59:12-155155 DEBUG    Running pip: install --upgrade timm==0.9.7
06:59:13-742561 DEBUG    Package version not found: pydantic
06:59:13-744564 INFO     Installing package: pydantic==1.10.11
06:59:13-745565 DEBUG    Running pip: install --upgrade pydantic==1.10.11
06:59:15-741912 INFO     Verifying packages
06:59:15-742920 DEBUG    Package version not found: clip
06:59:15-743920 INFO     Installing package: git+https://github.com/openai/CLIP.git
06:59:15-744913 DEBUG    Running pip: install --upgrade git+https://github.com/openai/CLIP.git
06:59:20-679017 DEBUG    Package version not found: invisible-watermark
06:59:20-681020 INFO     Installing package:
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
06:59:20-682021 DEBUG    Running pip: install --upgrade
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
06:59:26-578038 DEBUG    Package version not found: onnxruntime
06:59:26-580041 INFO     Installing package: onnxruntime==1.15.1
06:59:26-581042 DEBUG    Running pip: install --upgrade onnxruntime==1.15.1
06:59:30-636847 DEBUG    Package version not found: pi_heif
06:59:30-638850 INFO     Installing package: pi-heif
06:59:30-639851 DEBUG    Running pip: install --upgrade pi-heif
06:59:32-363299 DEBUG    Package version not found: tensorflow
06:59:32-364309 INFO     Installing package: tensorflow==2.13.0
06:59:32-366302 DEBUG    Running pip: install --upgrade tensorflow==2.13.0
07:00:06-432060 INFO     Verifying repositories
07:00:06-434064 INFO     Cloning repository: https://github.com/Stability-AI/stablediffusion.git
07:00:10-395374 INFO     Cloning repository: https://github.com/CompVis/taming-transformers.git
07:00:23-665215 INFO     Cloning repository: https://github.com/crowsonkb/k-diffusion.git
07:00:24-578616 INFO     Cloning repository: https://github.com/sczhou/CodeFormer.git
07:00:26-547906 INFO     Cloning repository: https://github.com/salesforce/BLIP.git
07:00:27-941526 INFO     Verifying submodules
07:00:51-994485 DEBUG    Submodule: extensions-builtin/clip-interrogator-ext / main
07:00:52-054539 DEBUG    Submodule: extensions-builtin/sd-extension-chainner / main
07:00:52-128606 DEBUG    Submodule: extensions-builtin/sd-extension-system-info / main
07:00:52-188661 DEBUG    Submodule: extensions-builtin/sd-webui-agent-scheduler / main
07:00:52-266732 DEBUG    Submodule: extensions-builtin/sd-webui-controlnet / main
07:00:52-412864 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-images-browser / main
07:00:52-471918 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-rembg / master
07:00:52-534976 DEBUG    Submodule: modules/lora / main
07:00:52-691117 DEBUG    Submodule: wiki / master
07:00:52-798214 DEBUG    Installed packages: 190
07:00:52-799318 DEBUG    Extensions all: ['clip-interrogator-ext', 'Lora', 'sd-extension-chainner',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg']
07:00:52-802321 DEBUG    Running extension installer: H:\automatic\extensions-builtin\clip-interrogator-ext\install.py
07:00:54-969628 INFO     Extension installed packages: clip-interrogator-ext ['clip-interrogator==0.6.0']
07:00:55-102620 DEBUG    Running extension installer:
                         H:\automatic\extensions-builtin\sd-extension-system-info\install.py
07:00:55-409940 DEBUG    Running extension installer:
                         H:\automatic\extensions-builtin\sd-webui-agent-scheduler\install.py
07:00:59-985449 INFO     Extension installed packages: sd-webui-agent-scheduler ['greenlet==3.0.0',
                         'SQLAlchemy==2.0.22']
07:00:59-987841 DEBUG    Running extension installer: H:\automatic\extensions-builtin\sd-webui-controlnet\install.py
07:01:15-902716 INFO     Extension installed packages: sd-webui-controlnet ['pywin32==306', 'lxml==4.9.3',
                         'opencv-contrib-python==4.8.1.78', 'reportlab==4.0.6', 'pycparser==2.21',
                         'portalocker==2.8.2', 'cffi==1.16.0', 'svglib==1.5.1', 'tinycss2==1.2.1', 'mediapipe==0.10.7',
                         'tabulate==0.9.0', 'cssselect2==0.7.0', 'webencodings==0.5.1', 'sounddevice==0.4.6',
                         'iopath==0.1.9', 'yacs==0.1.8', 'fvcore==0.1.5.post20221221']
07:01:15-907721 DEBUG    Running extension installer:
                         H:\automatic\extensions-builtin\stable-diffusion-webui-images-browser\install.py
07:01:18-137304 INFO     Extension installed packages: stable-diffusion-webui-images-browser ['Send2Trash==1.8.2']
07:01:18-139306 DEBUG    Running extension installer:
                         H:\automatic\extensions-builtin\stable-diffusion-webui-rembg\install.py
07:01:23-421723 INFO     Extension installed packages: stable-diffusion-webui-rembg ['rembg==2.0.50', 'pooch==1.7.0',
                         'PyMatting==1.1.10']
07:01:23-424946 DEBUG    Extensions all: []
07:01:23-425966 INFO     Extensions enabled: ['clip-interrogator-ext', 'Lora', 'sd-extension-chainner',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg']
07:01:23-427969 INFO     Verifying packages
07:01:23-429971 DEBUG    Setup complete without errors: 1697637683
07:01:23-463609 INFO     Extension preload: {'extensions-builtin': 0.02, 'extensions': 0.0}
07:01:23-465610 DEBUG    Starting module: <module 'webui' from 'H:\\automatic\\webui.py'>
07:01:23-466611 INFO     Command line args: ['--debug'] debug=True
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ H:\automatic\launch.py:215 in <module>                                                           │
│                                                                                                  │
│   212 │   # installer.log.debug(f"Args: {vars(args)}")                                           │
│   213 │   logging.disable(logging.NOTSET if args.debug else logging.DEBUG)                       │
│   214 │                                                                                          │
│ > 215 │   uv, instance = start_server(immediate=True, server=None)                               │
│   216 │   while True:                                                                            │
│   217 │   │   try:                                                                               │
│   218 │   │   │   alive = uv.thread.is_alive()                                                   │
│                                                                                                  │
│ H:\automatic\launch.py:147 in start_server                                                       │
│                                                                                                  │
│   144 │   server = importlib.util.module_from_spec(module_spec)                                  │
│   145 │   installer.log.debug(f'Starting module: {server}')                                      │
│   146 │   get_custom_args()                                                                      │
│ > 147 │   module_spec.loader.exec_module(server)                                                 │
│   148 │   uvicorn = None                                                                         │
│   149 │   if args.test:                                                                          │
│   150 │   │   installer.log.info("Test only")                                                    │
│ in exec_module:883                                                                               │
│ in _call_with_frames_removed:241                                                                 │
│                                                                                                  │
│ H:\automatic\webui.py:11 in <module>                                                             │
│                                                                                                  │
│     8 import importlib                                                                           │
│     9 import contextlib                                                                          │
│    10 from threading import Thread                                                               │
│ >  11 import modules.loader                                                                      │
│    12 import torch # pylint: disable=wrong-import-order                                          │
│    13 from modules import timer, errors, paths # pylint: disable=unused-import                   │
│    14 local_url = None                                                                           │
│                                                                                                  │
│ H:\automatic\modules\loader.py:32 in <module>                                                    │
│                                                                                                  │
│   29 warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")        │
│   30 timer.startup.record("torch")                                                               │
│   31                                                                                             │
│ > 32 from fastapi import FastAPI # pylint: disable=W0611,C0411                                   │
│   33 import gradio # pylint: disable=W0611,C0411                                                 │
│   34 timer.startup.record("gradio")                                                              │
│   35 errors.install([gradio])                                                                    │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\__init__.py:7 in <module>                            │
│                                                                                                  │
│    4                                                                                             │
│    5 from starlette import status as status                                                      │
│    6                                                                                             │
│ >  7 from .applications import FastAPI as FastAPI                                                │
│    8 from .background import BackgroundTasks as BackgroundTasks                                  │
│    9 from .datastructures import UploadFile as UploadFile                                        │
│   10 from .exceptions import HTTPException as HTTPException                                      │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\applications.py:16 in <module>                       │
│                                                                                                  │
│     13 │   Union,                                                                                │
│     14 )                                                                                         │
│     15                                                                                           │
│ >   16 from fastapi import routing                                                               │
│     17 from fastapi.datastructures import Default, DefaultPlaceholder                            │
│     18 from fastapi.exception_handlers import (                                                  │
│     19 │   http_exception_handler,                                                               │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\routing.py:22 in <module>                            │
│                                                                                                  │
│     19 │   Union,                                                                                │
│     20 )                                                                                         │
│     21                                                                                           │
│ >   22 from fastapi import params                                                                │
│     23 from fastapi._compat import (                                                             │
│     24 │   ModelField,                                                                           │
│     25 │   Undefined,                                                                            │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\params.py:5 in <module>                              │
│                                                                                                  │
│     2 from enum import Enum                                                                      │
│     3 from typing import Any, Callable, Dict, List, Optional, Sequence, Union                    │
│     4                                                                                            │
│ >   5 from fastapi.openapi.models import Example                                                 │
│     6 from pydantic.fields import FieldInfo                                                      │
│     7 from typing_extensions import Annotated, deprecated                                        │
│     8                                                                                            │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\openapi\models.py:4 in <module>                      │
│                                                                                                  │
│     1 from enum import Enum                                                                      │
│     2 from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Type, Union         │
│     3                                                                                            │
│ >   4 from fastapi._compat import (                                                              │
│     5 │   PYDANTIC_V2,                                                                           │
│     6 │   CoreSchema,                                                                            │
│     7 │   GetJsonSchemaHandler,                                                                  │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\_compat.py:20 in <module>                            │
│                                                                                                  │
│    17 │   Union,                                                                                 │
│    18 )                                                                                          │
│    19                                                                                            │
│ >  20 from fastapi.exceptions import RequestErrorModel                                           │
│    21 from fastapi.types import IncEx, ModelNameMap, UnionType                                   │
│    22 from pydantic import BaseModel, create_model                                               │
│    23 from pydantic.version import VERSION as PYDANTIC_VERSION                                   │
│                                                                                                  │
│ H:\automatic\venv\lib\site-packages\fastapi\exceptions.py:6 in <module>                          │
│                                                                                                  │
│     3 from pydantic import BaseModel, create_model                                               │
│     4 from starlette.exceptions import HTTPException as StarletteHTTPException                   │
│     5 from starlette.exceptions import WebSocketException as StarletteWebSocketException         │
│ >   6 from typing_extensions import Annotated, Doc  # type: ignore [attr-defined]                │
│     7                                                                                            │
│     8                                                                                            │
│     9 class HTTPException(StarletteHTTPException):                                               │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
ImportError: cannot import name 'Doc' from 'typing_extensions'
(H:\automatic\venv\lib\site-packages\typing_extensions.py)
Press any key to continue . . .

Backend

Original

Model

SD 1.5

Acknowledgements

Rinelw commented 9 months ago

It seems like it downloads the 4.7.1 version of typing_extensions.py which doesn't have a class called Doc download 4.8.0 version and it should work fine.

4joeknight4 commented 9 months ago

That did it. I changed the requirements to 4.8.0 and we're a go! Thank you.

vladmandic commented 9 months ago

fixed in update.