stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: ControlNet breaks my WebUI
Checklist
- [x] The issue exists after disabling all extensions
- [x] 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
- [x] 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?
After installing controlnet, geting: Failed install handrefineportable error. https://github.com/Mikubill/sd-webui-controlnet then on reboot the server/webui gets
Launching Web UI with arguments: --autolaunch --xformers
Traceback (most recent call last):
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\launch.py", line 48, in
Steps to reproduce the problem
installed fresh a1111 version 1.9 installed controlnet extension thru the webui get: Failed install handrefineportable error. rebooted server/webui webui stops working and get
What should have happened?
should NOT get handrefineportable error during controlnet install and webui should boot up without errors
What browsers do you use to access the UI ?
Google Chrome
Sysinfo
webui does not boot
Console logs
venv "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\Scripts\Python.exe"
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: 1.8.0-RC
Commit hash: <none>
Launching Web UI with arguments: --autolaunch --xformers
Traceback (most recent call last):
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\launch.py", line 48, in <module>
main()
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\launch.py", line 44, in main
start()
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\modules\launch_utils.py", line 465, in start
import webui
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\webui.py", line 13, in <module>
initialize.imports()
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\modules\initialize.py", line 23, in imports
import gradio # noqa: F401
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\gradio\__init__.py", line 3, in <module>
import gradio.components as components
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
from gradio.components.base import IOComponent, _Keywords
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\gradio\components\base.py", line 20, in <module>
from fastapi import UploadFile
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\fastapi\__init__.py", line 7, in <module>
from .applications import FastAPI as FastAPI
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\fastapi\applications.py", line 15, in <module>
from fastapi import routing
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\fastapi\routing.py", line 22, in <module>
from fastapi import params
File "C:\StableDiffusion\stable-diffusion-webui-1.8.0\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' (C:\StableDiffusion\stable-diffusion-webui-1.8.0\venv\lib\site-packages\pydantic\fields.py)
Press any key to continue . . .
Additional information
Someone else reported same issue on Controlnet repo but author said to report problem to A1111 as they have not changed anything new https://github.com/Mikubill/sd-webui-controlnet/issues/2757
I am having a similar issue: ImportError: cannot import name 'Undefined' from 'pydantic.fields' (C:\Users\palom\sdwebui\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\pydantic\fields.py)
I am having a similar issue: ImportError: cannot import name 'Undefined' from 'pydantic.fields' (C:\Users\palom\sdwebui\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\pydantic\fields.py)
actually there was already a thread about this, someone found a temporary fix i tried it and it worked. here is the link https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/15551
Was having this error, what worked; , renamed extension folder, deleted venv folder, reinstalled and going again. Borked again, does it with CN and Deforum
Some lib is not download/install it`s seem like, last month i got some issue;
I also had the same problem. How do I solve this?
downgrading pydantic
to 1.10.15
and albumentations
to 1.4.3
the can be done by running a pip command in the webui's python environment
from the webui root the following commands if using powershell on windwos
.\venv\Scripts\Activate.ps1
pip install albumentations==1.4.3
pip install pydantic==1.10.15
if using cmd on windows
venv\Scripts\activate
pip install albumentations==1.4.3
pip install pydantic==1.10.15
if using linux
source venv/bin/activate
pip install albumentations==1.4.3
pip install pydantic==1.10.15
I solved it by reinstalling Automatic1111 again with Windows :)
Hello, I just solved the problem. It seems that the issue might be due to the version incompatibility between the Pydantic version used and the version referenced in the code where "Undefined" is being used.
To address this issue, I tried resetting the virtual environment. You can manually delete the venv
folder in the directory and then create a new venv
folder in the same directory. Then activate the virtual environment:
venv\Scripts\activate
After activation, restart webui-user.bat
and wait for the new dependencies to be installed. Then, downgrade Pydantic to the version 1.10.15:
pip install pydantic==1.10.15
After that, run webui-user.bat
again, and everything should work fine.
I hope this helps everyone.
notice there is a update to the command that you need to run https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/15556#issuecomment-2063582512
- https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/15564