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

Correct hf hub download #1767

Merged
merged 3 commits into from
Dec 20, 2022
Merged

Correct hf hub download #1767

merged 3 commits into from
Dec 20, 2022

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Dec 19, 2022

Make sure only local files are downloaded if HF_HUB_OFFLINE is set to a truthy value.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 19, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, for some reason I expected the HF hub to look at the variable too, thanks for the update!

@patrickvonplaten patrickvonplaten merged commit 261a448 into main Dec 20, 2022
@patrickvonplaten patrickvonplaten deleted the correct_hf_hub_download branch December 20, 2022 01:37
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
* allow model download when no internet

* up

* make style
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* allow model download when no internet

* up

* make style
@Sanster
Copy link

Sanster commented Jan 16, 2024

The issue fixed in this PR has reappeared, and it was caused by this PR. It can be reproduced using the code here: #1717 (comment)

  • diffusers: 0.25.0
  • huggingface-hub: 0.20.2

@patrickvonplaten
Copy link
Contributor Author

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!

@Wauplin
Copy link
Contributor

Wauplin commented Jan 17, 2024

Hmm, I thought this was definitely fixed with #6456 and #6467 😕 Let me have a look at it. I'll try to reproduce with #1717 (comment) and report back.

@Wauplin
Copy link
Contributor

Wauplin commented Jan 17, 2024

I have been to reproduce it with diffusers 0.25.0. In fact, this is indeed fixed by #6456 and #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.

@patrickvonplaten
Copy link
Contributor Author

Let's make a patch release for this I'd say (cc @sayakpaul wdyt?)

@patrickvonplaten
Copy link
Contributor Author

patrickvonplaten commented Jan 17, 2024

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

@Wauplin
Copy link
Contributor

Wauplin commented Jan 17, 2024

Yes the patch release is needed to catch the OfflineModeIsEnabled exception here. Based on #1767 (comment), @Sanster already have the latest huggingface_hub release.

@patrickvonplaten
Copy link
Contributor Author

Makes sense, sorry I misunderstood the previous comment a bit 😅
https://pypi.org/project/diffusers/0.25.1/

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

Successfully merging this pull request may close these issues.

None yet

5 participants