Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: After the installation of insightface is completed, the pydantic version is upgraded to 2.7.1, and an error is reported directly when starting webui. #691

Open
1 of 6 tasks
2016geek opened this issue Apr 26, 2024 · 1 comment

Comments

@2016geek
Copy link

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?

run ’python webui.py‘, error:
Traceback (most recent call last):
File "/root/stable-diffusion-webui-forge/webui.py", line 19, in
initialize.imports()
File "/root/stable-diffusion-webui-forge/modules/initialize.py", line 35, in imports
import gradio # noqa: F401
File "/root/miniconda3/lib/python3.10/site-packages/gradio/init.py", line 3, in
import gradio.components as components
File "/root/miniconda3/lib/python3.10/site-packages/gradio/components/init.py", line 1, in
from gradio.components.annotated_image import AnnotatedImage
File "/root/miniconda3/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 13, in
from gradio.components.base import IOComponent, _Keywords
File "/root/miniconda3/lib/python3.10/site-packages/gradio/components/base.py", line 20, in
from fastapi import UploadFile
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/init.py", line 7, in
from .applications import FastAPI as FastAPI
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/applications.py", line 15, in
from fastapi import routing
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/routing.py", line 22, in
from fastapi import params
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/params.py", line 4, in
from pydantic.fields import FieldInfo, Undefined
ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/root/miniconda3/lib/python3.10/site-packages/pydantic/fields.py)

Steps to reproduce the problem

  1. run 'python launch.py'
  2. run 'python webui.py',success
  3. run 'pip install insightface==0.7.3'
  4. run 'python webui.py',error

What should have happened?

run 'python webui.py' ,success after install insightface

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2024-04-26-09-58.json

Console logs

pip install insightface==0.7.3
python webui.py
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 D : 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 "/root/stable-diffusion-webui-forge/webui.py", line 19, in <module>
    initialize.imports()
  File "/root/stable-diffusion-webui-forge/modules/initialize.py", line 35, in imports
    import gradio  # noqa: F401
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/root/miniconda3/lib/python3.10/site-packages/pydantic/fields.py)

Additional information

python: 3.10.8  •  torch: 2.1.2+cu121
ubuntu

@thiagojramos
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants