lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.88k stars 192 forks source link

[Bug]: WebUI unable to launch again after first time #448

Closed popsoda27 closed 7 months ago

popsoda27 commented 7 months ago

Checklist

What happened?

WebUI is not launching again after first launch.

venv "E:\Downloads\stable-diffusion-webui-directml\venv\Scripts\Python.exe" Traceback (most recent call last): File "E:\Downloads\stable-diffusion-webui-directml\launch.py", line 48, in main() File "E:\Downloads\stable-diffusion-webui-directml\launch.py", line 29, in main filename = launch_utils.dump_sysinfo() File "E:\Downloads\stable-diffusion-webui-directml\modules\launch_utils.py", line 705, in dump_sysinfo from modules import sysinfo File "E:\Downloads\stable-diffusion-webui-directml\modules\sysinfo.py", line 12, in from modules import paths_internal, timer, shared, extensions, errors, devices File "E:\Downloads\stable-diffusion-webui-directml\modules\shared.py", line 4, in import gradio as gr File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio__init.py", line 3, in import gradio.components as components File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components__init__.py", line 1, in from gradio.components.annotated_image import AnnotatedImage File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components\annotated_image.py", line 13, in from gradio.components.base import IOComponent, _Keywords File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components\base.py", line 20, in from fastapi import UploadFile File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\init__.py", line 7, in from .applications import FastAPI as FastAPI File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\applications.py", line 15, in from fastapi import routing File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\routing.py", line 22, in from fastapi import params File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\params.py", line 4, in from pydantic.fields import FieldInfo, Undefined ImportError: cannot import name 'Undefined' from 'pydantic.fields' (E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\pydantic\fields.py) Press any key to continue . . .

Steps to reproduce the problem

1, Fresh install A1111

  1. Append --use-zluda --autolaunch to cmd args in webui-user.bat
  2. WebUI launches successfully first time.
  3. Installed some extensions. Exit WebUI and console.
  4. Relaunched webui-user.bat. Console presented error....press any key to continue. Console exits after keypress.
  5. Removed installed extensions. Same error on launch.
  6. Removed venv. Venv folder recreated on launch. Same error on launch.
  7. Removed cmd args and added --dump-sysinfo. Same error on launch. Sysinfo dump not created.
  8. Removed cmd args and added --use-directml. Same error on launch.

What should have happened?

WebUI should launch successfully. Not extension issue as WebUI not launching even after extensions were removed.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

Sysinfo not generated at all with --dump-sysinfo cmd arg

Console logs

venv "E:\Downloads\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
Traceback (most recent call last):
  File "E:\Downloads\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "E:\Downloads\stable-diffusion-webui-directml\launch.py", line 29, in main
    filename = launch_utils.dump_sysinfo()
  File "E:\Downloads\stable-diffusion-webui-directml\modules\launch_utils.py", line 705, in dump_sysinfo
    from modules import sysinfo
  File "E:\Downloads\stable-diffusion-webui-directml\modules\sysinfo.py", line 12, in <module>
    from modules import paths_internal, timer, shared, extensions, errors, devices
  File "E:\Downloads\stable-diffusion-webui-directml\modules\shared.py", line 4, in <module>
    import gradio as gr
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\components\base.py", line 20, in <module>
    from fastapi import UploadFile
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\applications.py", line 15, in <module>
    from fastapi import routing
  File "E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\routing.py", line 22, in <module>
    from fastapi import params
  File "E:\Downloads\stable-diffusion-webui-directml\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' (E:\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\pydantic\fields.py)
Press any key to continue . . .

Additional information

AMD 7800X3D Asrock 7900XTX Taichi OC 32GB RAM Python 3.10.6 HIP SDK installed and PATH added

Anders1974 commented 7 months ago

I have the same mistake.

Already up to date. venv "C:\stable-diffusion-webui-directml\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.9.0-5-g74787236 Commit hash: 74787236d0ff94dc37506d198f3b2562991b8702 Traceback (most recent call last): File "C:\stable-diffusion-webui-directml\launch.py", line 48, in main() File "C:\stable-diffusion-webui-directml\launch.py", line 39, in main prepare_environment() File "C:\stable-diffusion-webui-directml\modules\launch_utils.py", line 658, in prepare_environment from modules.onnx_impl import initialize_olive File "C:\stable-diffusion-webui-directml\modules\onnx_impl__init__.py", line 10, in from fastapi import encoders as fastapi_encoders File "C:\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi__init__.py", line 7, in from .applications import FastAPI as FastAPI File "C:\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\applications.py", line 15, in from fastapi import routing File "C:\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\routing.py", line 22, in from fastapi import params File "C:\stable-diffusion-webui-directml\venv\lib\site-packages\fastapi\params.py", line 4, in from pydantic.fields import FieldInfo, Undefined ImportError: cannot import name 'Undefined' from 'pydantic.fields' (C:\stable-diffusion-webui-directml\venv\lib\site-packages\pydantic\fields.py)

lshqqytiger commented 7 months ago

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/15564

popsoda27 commented 7 months ago

AUTOMATIC1111#15564

Thank you @lshqqytiger I confirm this solves the issue on my machine.