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_demo.py How to solve compatibility problems? #104

Open
yitao2020 opened this issue Nov 15, 2024 · 8 comments
Open

python gradio_demo.py How to solve compatibility problems? #104

yitao2020 opened this issue Nov 15, 2024 · 8 comments

Comments

@yitao2020
Copy link

(iclight) D:\IC-Light>python gradio_demo.py
Traceback (most recent call last):
File "D:\IC-Light\gradio_demo.py", line 10, in
from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
File "C:\Users\WIN10.conda\envs\iclight\lib\site-packages\diffusers_init_.py", line 5, in
from .utils import (
File "C:\Users\WIN10.conda\envs\iclight\lib\site-packages\diffusers\utils_init_.py", line 38, in
from .dynamic_modules_utils import get_class_from_dynamic_module
File "C:\Users\WIN10.conda\envs\iclight\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' (C:\Users\WIN10.conda\envs\iclight\lib\site-packages\huggingface_hub_init_.py)

(iclight) D:\IC-Light>where python
C:\Users\WIN10.conda\envs\iclight\python.exe
D:\ProgramData\anaconda3\python.exe
C:\Users\WIN10\AppData\Local\Programs\Python\Python310\python.exe
C:\Users\WIN10\AppData\Local\Programs\Python\Python313\python.exe
C:\Users\WIN10\AppData\Local\Microsoft\WindowsApps\python.exe

@Ted-cuchuan
Copy link

i also encounter this problem, do you know how to solve this right now? I even try to run this project on google colab, but the error message is the same.

@yitao2020
Copy link
Author

i also encounter this problem, do you know how to solve this right now? I even try to run this project on google colab, but the error message is the same.

What a pain in the ass. I searched carefully for the problem last night and found that the 'cached_download' import command was removed from huggingface_hub 0.26.0. You can only downgrade and manually install huggingface_hub 0.25.0. The downgraded version can start normally, and it must be shut down. for the agent to function properly.

@Ted-cuchuan
Copy link

Ted-cuchuan commented Nov 16, 2024

Well received. Thanks you so much!!! I try the method and i can initiate the model now. But once i upload a picutre, i run the gradio, the gradio just show a error without any further message. The screen capture i attached. Did you run this model successfully on your local device? I am still trying, hope you can help me solve that.
10f0970785aae1ed43cbd6af44ebe2a

i also encounter this problem, do you know how to solve this right now? I even try to run this project on google colab, but the error message is the same.

What a pain in the ass. I searched carefully for the problem last night and found that the 'cached_download' import command was removed from huggingface_hub 0.26.0. You can only downgrade and manually install huggingface_hub 0.25.0. The downgraded version can start normally, and it must be shut down. for the agent to function properly.

@yitao2020
Copy link
Author

Well received. Thanks you so much!!! I try the method and i can initiate the model now. But once i upload a picutre, i run the gradio, the gradio just show a error without any further message. The screen capture i attached. Did you run this model successfully on your local device? I am still trying, hope you can help me solve that. 10f0970785aae1ed43cbd6af44ebe2a

i also encounter this problem, do you know how to solve this right now? I even try to run this project on google colab, but the error message is the same.

What a pain in the ass. I searched carefully for the problem last night and found that the 'cached_download' import command was removed from huggingface_hub 0.26.0. You can only downgrade and manually install huggingface_hub 0.25.0. The downgraded version can start normally, and it must be shut down. for the agent to function properly.

Having the same problems, I don't have that much time to solve them. I went to Bilibili to search and there are many integration packages available for download. I suggest you go there and take a look.

@tangjm24
Copy link

tangjm24 commented Dec 3, 2024

change from huggingface_hub import cached_download, hf_hub_download, model_info to from huggingface_hub import hf_hub_download, model_info helps for me

@MADM1k33
Copy link

MADM1k33 commented Dec 4, 2024

Type this, after activating conda env - pip install gradio=3.48.0

@pj263
Copy link

pj263 commented Dec 13, 2024

change from huggingface_hub import cached_download, hf_hub_download, model_info to from huggingface_hub import hf_hub_download, model_info helps for me

Tried this, still getting the same error. Any other ideas that worked for you?

@jhartquist
Copy link

change from huggingface_hub import cached_download, hf_hub_download, model_info to from huggingface_hub import hf_hub_download, model_info helps for me

Tried this, still getting the same error. Any other ideas that worked for you?

Updating to the latest diffusers and transformers fixed this particular issue for me

pip install -U diffusers transformers

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

6 participants