lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
5.28k stars 519 forks source link

[Bug]: WebUI doesn't start using default requirements #776

Open PegasusSpectra opened 1 month ago

PegasusSpectra commented 1 month ago

Checklist

What happened?

there is no pydantic==1.10.11 on my installation of WebUI Forge. Also there exists a script for xformers that doesn't install xformers on default.

Steps to reproduce the problem

  1. start Webui-user.bat
  2. get Error message
  3. (fix) add --xformers to webui-user.bat
  4. (fix) activate venv enviroment and install with pip "pip install pydantic==1.10.11"
  5. Launches successfully

What should have happened?

WebUI should have installed the packages automatically and launched without error

What browsers do you use to access the UI ?

Microsoft Edge

Sysinfo

sysinfo-2024-06-01-10-22.json

Console logs

venv "D:\AI\1.stable-diffusion-webui-forge\venv\Scripts\Python.exe"
Python 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:24:38) [MSC v.1916 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-276-g29be1da7
Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7
Launching Web UI with arguments: --xformers --ckpt-dir D:AI1.Automatic1111modelsStable-diffusion --hypernetwork-dir D:AI1.Automatic1111modelshypernetworks --embeddings-dir D:AI1.Automatic1111embeddings --lora-dir D:AI1.Automatic1111modelsLora
Total VRAM 8192 MB, total RAM 32604 MB
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
xformers version: 0.0.23.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3070 Ti : 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 "D:\AI\1.stable-diffusion-webui-forge\launch.py", line 51, in <module>
    main()
  File "D:\AI\1.stable-diffusion-webui-forge\launch.py", line 47, in main
    start()
  File "D:\AI\1.stable-diffusion-webui-forge\modules\launch_utils.py", line 541, in start
    import webui
  File "D:\AI\1.stable-diffusion-webui-forge\webui.py", line 19, in <module>
    initialize.imports()
  File "D:\AI\1.stable-diffusion-webui-forge\modules\initialize.py", line 35, in imports
    import gradio  # noqa: F401
  File "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "D:\AI\1.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 "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\base.py", line 20, in <module>
    from fastapi import UploadFile
  File "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\applications.py", line 15, in <module>
    from fastapi import routing
  File "D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\fastapi\routing.py", line 22, in <module>
    from fastapi import params
  File "D:\AI\1.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' (D:\AI\1.stable-diffusion-webui-forge\venv\lib\site-packages\pydantic\fields.py)
Drücken Sie eine beliebige Taste . . .

Additional information

also the arguments to set a base directory of automatic1111 seem to be broken

PegasusSpectra commented 1 month ago

thats my current webui-user.bat :

@echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS= --xformers --no-download-sd-model

@REM Uncomment following code to reference an existing A1111 checkout. set A1111_HOME=D:\AI\1.Automatic1111

set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^ --ckpt-dir %A1111_HOME%\models\Stable-diffusion ^ --hypernetwork-dir %A1111_HOME%\models\hypernetworks ^ --embeddings-dir %A1111_HOME%\embeddings ^ --lora-dir %A1111_HOME%\models\Lora

call webui.bat

Languedok commented 3 weeks ago

--xformers

don't work for me...

yuehongzhang001 commented 2 weeks ago

My solution: .\venv\Scripts\pip.exe install fastapi==0.111.0