lllyasviel/IC-Light

python gradio_demo.py How to solve compatibility problems?

yitao2020 opened this issue · 9 comments

(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

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.

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.

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.

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.

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

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

pj263 commented

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?

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