-
Notifications
You must be signed in to change notification settings - Fork 28.2k
[Bug]: ImportError: cannot import name 'TypeIs' from 'typing_extensions' #16520
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
Comments
I think this is the root cause for AbdBarho/stable-diffusion-webui-docker#742 Lots of people (including myself) reporting that a workaround is to install the additional missing library by changing the Dockerfile as follows (notice the
So this likely just needs a |
This change also worked for me. |
Indeed, and by the way many identical issues have been reported in that other repo: AbdBarho/stable-diffusion-webui-docker#719 Good practice alert !! 👉 Rather than installing |
The Python library called typing-extensions is intended to make new features related to Type Hinting, which are added in newer Python versions, available for use in older Python versions (Backward Compatibility). TypeIs is one such feature that was added in typing-extensions version 4.3.0. Other libraries used by Automatic1111 (such as fastapi, pydantic, or other Type Hinting-related dependencies) may need to use TypeIs. This means they require typing-extensions version 4.3.0 or higher. |
However, the fix mentioned above, is working for me anymore. |
Checklist
What happened?
#16383
Building at least the
auto-cpu
image fails with:ImportError: cannot import name 'TypeIs' from 'typing_extensions' (/opt/conda/lib/python3.10/site-packages/typing_extensions.py)
The linked discussion suggests modifying the Dockerfile to update the
typing_extensions
module to a newer version, which fixes the issue.Steps to reproduce the problem
docker compose --profile auto-cpu up --build
What should have happened?
Build should not fail with an ImportError
What browsers do you use to access the UI ?
No response
Sysinfo
n/a
Console logs
The text was updated successfully, but these errors were encountered: