Correct hf hub download
Make sure only local files are downloaded if HF_HUB_OFFLINE is set to a truthy value.
The documentation is not available anymore as the PR was closed or merged.
The issue fixed in this PR has reappeared, and it was caused by this PR. It can be reproduced using the code here: https://github.com/huggingface/diffusers/issues/1717#issuecomment-1357926423
- diffusers: 0.25.0
- huggingface-hub: 0.20.2
Thanks for the bug report @Sanster - @Wauplin do you maybe have an idea how to fix it? Otherwise, I can dive a bit deeper here as well!
Hmm, I thought this was definitely fixed with https://github.com/huggingface/diffusers/pull/6456 and https://github.com/huggingface/diffusers/pull/6467 :confused: Let me have a look at it. I'll try to reproduce with https://github.com/huggingface/diffusers/issues/1717#issuecomment-1357926423 and report back.
I have been to reproduce it with diffusers 0.25.0. In fact, this is indeed fixed by https://github.com/huggingface/diffusers/pull/6456 and https://github.com/huggingface/diffusers/pull/6467 but they haven't made it to the 0.25.0 release. I retried by installing diffusers from main and it worked as expected.
So @patrickvonplaten would it be possible to either make a patch release 0.25.1 with those two or to make a 0.26.0 soon?
@Sanster in the meantime, you can install diffusers from source with pip install diffusers@git+https://github.com/huggingface/diffusers and it should fix your problem.
Let's make a patch release for this I'd say (cc @sayakpaul wdyt?)
Actually I think just doing pip install --upgrade huggingface_hub should fix the problem no? Not sure we actually need a diffusers patch release here
Yes the patch release is needed to catch the OfflineModeIsEnabled exception here. Based on https://github.com/huggingface/diffusers/pull/1767#issuecomment-1893417458, @Sanster already have the latest huggingface_hub release.
Makes sense, sorry I misunderstood the previous comment a bit 😅 https://pypi.org/project/diffusers/0.25.1/