lllyasviel / lllyasviel/ControlNet

cannot import name 'Undefined' from 'pydantic.fields' Error

Open
#671 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

I can use stable diffusion without any problems. However, whenever I try to install ControlNet, I encounter the error below and can't use the program. I've reinstalled the program from scratch, but it didn't fix the issue. I tried "pip install --upgrade pip" but it didn't work either. Most of the solutions I found online didn't help.

File "C:\Users\AFK\Downloads\sd.webui\system\python\lib\site-packages\fastapi\params.py", line 4, in
from pydantic.fields import FieldInfo, Undefined
ImportError: cannot import name 'Undefined' from 'pydantic.fields' (C:\Users\AFK\Downloads\sd.webui\system\python\lib\site-packages\pydantic\fields.py)
Press any key to continue . . .

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ControlNet installation and inspect the traceback entries system/python/lib/site-packages/fastapi/params.py and pydantic/fields.py. Compare the installed dependency versions and verify that the program starts without the Undefined import error after installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.