lllyasviel / lllyasviel/stable-diffusion-webui-forge
[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.
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 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
- [X] 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](https://github.com/lllyasviel/stable-diffusion-webui-forge/files/15128640/sysinfo-2024-04-26-09-58.json)
### Console logs
```Shell
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
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
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the listed Python commands, then trace startup from webui.py through modules/initialize.py and the gradio, fastapi, and pydantic imports shown in the traceback. Determine the dependency incompatibility introduced by installing insightface==0.7.3 and verify that python webui.py starts successfully afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100