换脸插件升级导致SDWebUI无法启动cannot import name ‘Undefined‘ from ‘pydantic.fields‘
FoxMale007 2024-06-16 12:33:04 阅读 83
今天在一台新的机器环境装了SDWEBUI,都使用最新的版本,升级了下换脸的插件,于是乎启动崩溃了。错误如下
Launching Web UI with arguments: --listen --skip-torch-cuda-test --disable-nan-check --skip-version-check --skip-python-version-check --enable-insecure-extension-access --api --xformers --xformers-flash-attention --opt-sdp-attention --no-half-vae --ad-no-huggingface --theme=dark --lora-dir /mnt/e/sddata/Lora --vae-dir /mnt/e/sddata/VAE --ckpt-dir /mnt/e/sddata/checkpoint --controlnet-dir /mnt/e/sddata/ControlNet --embeddings-dir /mnt/e/sddata/embeddings --controlnet-annotator-models-path /mnt/e/sddata/downloadsTraceback (most recent call last): File "/mnt/e/sd-webui-aki-v4.7/launch.py", line 48, in <module> main() File "/mnt/e/sd-webui-aki-v4.7/launch.py", line 44, in main start() File "/mnt/e/sd-webui-aki-v4.7/modules/launch_utils.py", line 465, in start import webui File "/mnt/e/sd-webui-aki-v4.7/webui.py", line 13, in <module> initialize.imports() File "/mnt/e/sd-webui-aki-v4.7/modules/initialize.py", line 23, in imports import gradio # noqa: F401 ^^^^^^^^^^^^^ File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/gradio/components/__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/gradio/components/annotated_image.py", line 13, in <module> from gradio.components.base import IOComponent, _Keywords File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/gradio/components/base.py", line 20, in <module> from fastapi import UploadFile File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/fastapi/__init__.py", line 7, in <module> from .applications import FastAPI as FastAPI File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/fastapi/applications.py", line 15, in <module> from fastapi import routing File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/fastapi/routing.py", line 22, in <module> from fastapi import params File "/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/fastapi/params.py", line 4, in <module> from pydantic.fields import FieldInfo, UndefinedImportError: cannot import name 'Undefined' from 'pydantic.fields' (/mnt/e/sd-webui-aki-v4.7/venv/lib/python3.11/site-packages/pydantic/fields.py)
google了下是pydantic要使用1.10.15版本
于是乎降级pydantic,发现gradio和albumentations又报错了,因为依赖最新的版本,结果还得给gradio和albumentations降级。降级到去年年底的版本
折腾了一个小时。。。。。降级后错误依旧,没道理
冷静。。。。。
索性uninstall掉gradio,发现错误依旧。。。。
有点头绪了,怎么没uninstall掉,仔细看了下目录,里面还有个坑爹的venv,再进去看,gradio还是原来的版本。有头绪了,估计我使用的conda环境对venv没作用
source /mnt/e/sd-webui-aki-v4.7/venv/bin/activate
一下,进去venv了
把降级的操作重做一遍:
pip uninstall pydanticpip uninstall gradio pip uninstall albumentationspip install pydantic==1.10.15pip install gradio==3.50.2pip install albumentations==1.3.1
然后启动sd。。。
熟悉的界面终于出来了,内牛满面
上一篇: SLAM基础知识:前端和后端
下一篇: Web 后台项目,权限如何定义、设置、使用:菜单权限、按钮权限 ts element-ui-Plus
本文标签
换脸插件升级导致SDWebUI无法启动cannot import name ‘Undefined‘ from ‘pydantic.fields‘
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。