lllyasviel / stable-diffusion-webui-forge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Error installing

west1778 opened this issue · comments

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

When installing via git clone or the zip file and launching I get an error.

Steps to reproduce the problem

Tried installing via git clone and the zip

What should have happened?

Should have launched like normal

What browsers do you use to access the UI ?

No response

Sysinfo

Would love to if I could get to it.

Console logs

Creating venv in directory C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv using python "C:\Program Files\Python310\python.exe"
venv "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-277-g0af28699
Commit hash: 0af28699c45c1c5bf9cb6818caac6ce881123131
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
Collecting torch==2.1.2
  Using cached https://download.pytorch.org/whl/cu121/torch-2.1.2%2Bcu121-cp310-cp310-win_amd64.whl (2473.9 MB)
Collecting torchvision==0.16.2
  Using cached https://download.pytorch.org/whl/cu121/torchvision-0.16.2%2Bcu121-cp310-cp310-win_amd64.whl (5.6 MB)
Collecting jinja2
  Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
Collecting sympy
  Using cached sympy-1.12.1-py3-none-any.whl (5.7 MB)
Collecting fsspec
  Using cached fsspec-2024.6.0-py3-none-any.whl (176 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting networkx
  Using cached networkx-3.3-py3-none-any.whl (1.7 MB)
Collecting filelock
  Using cached filelock-3.14.0-py3-none-any.whl (12 kB)
Collecting requests
  Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting numpy
  Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB)
Collecting pillow!=8.3.*,>=5.3.0
  Using cached pillow-10.3.0-cp310-cp310-win_amd64.whl (2.5 MB)
Collecting MarkupSafe>=2.0
  Using cached https://download.pytorch.org/whl/MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl (17 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.7-py3-none-any.whl (66 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2024.6.2-py3-none-any.whl (164 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB)
Collecting mpmath<1.4.0,>=1.1.0
  Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, fsspec, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision
Successfully installed MarkupSafe-2.1.5 certifi-2024.6.2 charset-normalizer-3.3.2 filelock-3.14.0 fsspec-2024.6.0 idna-3.7 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 numpy-1.26.4 pillow-10.3.0 requests-2.32.3 sympy-1.12.1 torch-2.1.2+cu121 torchvision-0.16.2+cu121 typing-extensions-4.12.2 urllib3-2.2.1

[notice] A new release of pip available: 22.3.1 -> 24.0
[notice] To update, run: C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\Scripts\python.exe -m pip install --upgrade pip
Installing clip
Installing open_clip
Cloning assets into C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\stable-diffusion-webui-assets...
Cloning into 'C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\stable-diffusion-webui-assets'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 0), reused 20 (delta 0), pack-reused 0
Receiving objects: 100% (20/20), 132.70 KiB | 3.02 MiB/s, done.
Cloning Stable Diffusion into C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\stable-diffusion-stability-ai...
Cloning into 'C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\stable-diffusion-stability-ai'...
remote: Enumerating objects: 580, done.
remote: Counting objects: 100% (571/571), done.
remote: Compressing objects: 100% (306/306), done.
remote: Total 580 (delta 278), reused 446 (delta 247), pack-reused 9
Receiving objects: 100% (580/580), 73.44 MiB | 46.65 MiB/s, done.
Resolving deltas: 100% (278/278), done.
Cloning Stable Diffusion XL into C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\generative-models...
Cloning into 'C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\generative-models'...
remote: Enumerating objects: 941, done.
remote: Total 941 (delta 0), reused 0 (delta 0), pack-reused 941
Receiving objects: 100% (941/941), 43.85 MiB | 54.70 MiB/s, done.
Resolving deltas: 100% (489/489), done.
Cloning K-diffusion into C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\k-diffusion...
Cloning into 'C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\k-diffusion'...
remote: Enumerating objects: 1345, done.
remote: Counting objects: 100% (1345/1345), done.
remote: Compressing objects: 100% (434/434), done.
remote: Total 1345 (delta 944), reused 1264 (delta 904), pack-reused 0
Receiving objects: 100% (1345/1345), 239.04 KiB | 3.98 MiB/s, done.
Resolving deltas: 100% (944/944), done.
Cloning BLIP into C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\BLIP...
Cloning into 'C:\AiArt\Forge-SD\stable-diffusion-webui-forge\repositories\BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112
Receiving objects: 100% (277/277), 7.03 MiB | 30.78 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Installing requirements
Installing forge_legacy_preprocessor requirement: fvcore
Installing forge_legacy_preprocessor requirement: mediapipe
Installing forge_legacy_preprocessor requirement: onnxruntime
Installing forge_legacy_preprocessor requirement: changing opencv-python version from 4.10.0.82 to 4.8.0
Installing forge_legacy_preprocessor requirement: svglib
Installing forge_legacy_preprocessor requirement: insightface
Installing forge_legacy_preprocessor requirement: handrefinerportable
Installing forge_legacy_preprocessor requirement: depth_anything
Installing sd-forge-controlnet requirement: changing opencv-python version from 4.10.0.82 to 4.8.0
Launching Web UI with arguments:
Total VRAM 10240 MB, total RAM 32659 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 : native
Hint: your device supports --pin-shared-memory for potential speed improvements.
Hint: your device supports --cuda-malloc for potential speed improvements.
Hint: your device supports --cuda-stream for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  False
Traceback (most recent call last):
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\launch.py", line 51, in <module>
    main()
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\launch.py", line 47, in main
    start()
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\modules\launch_utils.py", line 541, in start
    import webui
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\webui.py", line 19, in <module>
    initialize.imports()
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\modules\initialize.py", line 35, in imports
    import gradio  # noqa: F401
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\base.py", line 20, in <module>
    from fastapi import UploadFile
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\applications.py", line 15, in <module>
    from fastapi import routing
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\routing.py", line 22, in <module>
    from fastapi import params
  File "C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\params.py", line 4, in <module>
    from pydantic.fields import FieldInfo, Undefined
ImportError: cannot import name 'Undefined' from 'pydantic.fields' (C:\AiArt\Forge-SD\stable-diffusion-webui-forge\venv\lib\site-packages\pydantic\fields.py)
Press any key to continue . . .

Additional information

No response

I hope you get an answer because I just got a 4070 ti Super and have been waiting so long it seems to try this UI. by any chance did you recently switch from AMD to Nvidia too? I saw it said Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] and it says that on mine as well.. I have an AMD CPU so maybe that's why. but just curious

I hope you get an answer because I just got a 4070 ti Super and have been waiting so long it seems to try this UI. by any chance did you recently switch from AMD to Nvidia too? I saw it said Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] and it says that on mine as well.. I have an AMD CPU so maybe that's why. but just curious

No same computer I've always had. I've even used Forge on this computer with no problem before. So not sure what's going on

Same error here on a new installation.
On a new installation, adding pydantic==1.10.15 to "requirements_versions.txt" fix it.
Not really sure, because then gave me a jax error too =/

Same error here on a new installation. On a new installation, adding pydantic==1.10.15 to "requirements_versions.txt" fix it. Not really sure, because then gave me a jax error too =/

Yeah added to my requirements and still same error. :(

I ran into the same error and was able to get around it by doing the following.

Open CMD
Run the venv environment activation script located at \stable-diffusion-webui-forge\venv\Scripts\activate.bat
From the (venv) cmd prompt enter 'pip show pydantic'
If it shows anything higher than Version: 1.10.15 uninstall pydantic with 'pip uninstall pydantic'
Enter Y to proceed
Reinstall pydantic with 'pip install pydantic==1.10.15'
Enter 'pip show pydantic' to confirm the correct version

Then run webui-user.bat as you usually do.

I ran into the same error and was able to get around it by doing the following.

Open CMD Run the venv environment activation script located at \stable-diffusion-webui-forge\venv\Scripts\activate.bat From the (venv) cmd prompt enter 'pip show pydantic' If it shows anything higher than Version: 1.10.15 uninstall pydantic with 'pip uninstall pydantic' Enter Y to proceed Reinstall pydantic with 'pip install pydantic==1.10.15' Enter 'pip show pydantic' to confirm the correct version

Then run webui-user.bat as you usually do.

OMG Totally worked thank you so very much! I love you bro!

This method works the first time, but for some reason I get a Jax error when trying to run it again on a fresh install =(
Any clues anyone, thanks?