LECO icon indicating copy to clipboard operation
LECO copied to clipboard

cannot import name 'cached_download' from 'huggingface_hub'

Open terracottahaniwa opened this issue 1 year ago • 1 comments

I can't run train_lora.py and get this error. My solution was appending huggingface-hub==0.25.2 into the requirements.txt.

https://github.com/huggingface/huggingface_hub/issues/2617

terracottahaniwa avatar Dec 31 '24 18:12 terracottahaniwa

Hey there, maintainer of huggingface_hub here. Sorry for all the trouble this breaking change introduced. The best -and future proof- solution to fix this is to upgrade diffusers version to a more recent version (>=0.29.0).

pip install "diffusers>=0.29.0"

This fixed version dates back to June 2024. The issue with pinning huggingface_hub to an old version is that it might conflict with future versions of diffusers/transformers.

Hope this will prove useful :pray:

Wauplin avatar Jan 15 '25 09:01 Wauplin