Skip to content
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

运行python gradio_app.py时报错 #124

Open
HazeBlue opened this issue Nov 14, 2024 · 5 comments
Open

运行python gradio_app.py时报错 #124

HazeBlue opened this issue Nov 14, 2024 · 5 comments

Comments

@HazeBlue
Copy link

Traceback (most recent call last):
File "H:\Omost\gradio_app.py", line 26, in
from diffusers import AutoencoderKL, UNet2DConditionModel
File "H:\conda\envs\omost\lib\site-packages\diffusers_init_.py", line 5, in
from .utils import (
File "H:\conda\envs\omost\lib\site-packages\diffusers\utils_init_.py", line 38, in
from .dynamic_modules_utils import get_class_from_dynamic_module
File "H:\conda\envs\omost\lib\site-packages\diffusers\utils\dynamic_modules_utils.py", line 28, in
from huggingface_hub import cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (H:\conda\envs\omost\lib\site-packages\huggingface_hub_init_.py)
这个是啥问题
雾霾蓝先生_2024-11-14_18-17-34

@ChantMyZeal
Copy link

maybe you can try: pip install --upgrade diffusers

@HazeBlue
Copy link
Author

maybe you can try: pip install --upgrade diffusers
雾霾蓝先生_2024-11-20_23-21-43

@GawainProdigy
Copy link

Same issue. Upgrading diffusers does not help.

(tutorial-env) H:\olmost\Omost>python gradio_app.py
Traceback (most recent call last):
File "H:\olmost\Omost\gradio_app.py", line 26, in
from diffusers import AutoencoderKL, UNet2DConditionModel
File "H:\olmost\Omost\tutorial-env\Lib\site-packages\diffusers_init_.py", line 5, in
from .utils import (
File "H:\olmost\Omost\tutorial-env\Lib\site-packages\diffusers\utils_init_.py", line 38, in
from .dynamic_modules_utils import get_class_from_dynamic_module
File "H:\olmost\Omost\tutorial-env\Lib\site-packages\diffusers\utils\dynamic_modules_utils.py", line 28, in
from huggingface_hub import cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (H:\olmost\Omost\tutorial-env\Lib\site-packages\huggingface_hub_init_.py)

Tried to get coding help from various artificial intelligence. Scoured the internet. Tried all the fixes thrown at me. Did several fresh installs. On different drives. Can't figure out what's going on here. Please help.

@ChantMyZeal
Copy link

it seems that huggingface_hub 0.26 removes 'cached_download', maybe you can reinstall huggingface_hub<=0.25.2

@GawainProdigy
Copy link

@ChantMyZeal: In fact, you are correct. I've seen my same issue bandied about, even in different projects and on Reddit. And, you have provided the solution. I want to personally say thank you to you, because it's Christmas and this is a wonderful Christmas present.

Further, I hope our interchange helps other people having this issue resolved theirs as well so they can try this very ingenious application so generously shared under the auspices of lllyasviel.

Or, more colloquially: thanks a lot. Cheers mate, and have a good one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants