| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Subodh Bansode <subodh171011@gmail.com>
|
The TruffleHog Secret Scanning check is failing on 4 unverified AzureSasToken findings, but none are introduced by this PR. I compared the PR diff against origin/main:
I have therefore left the implementation unchanged rather than modifying unrelated repository content to address the scan result. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What does this PR do?
Fixes an issue where ModelMixin.from_pretrained() could fail to load a fully cached sharded checkpoint when HF_HUB_OFFLINE=1.
When loading sharded checkpoints, _get_checkpoint_shard_files() could still call the Hugging Face Hub metadata API unless local_files_only=True was explicitly passed. In offline mode this caused an OfflineModeIsEnabled error even though all required checkpoint files were already available in the local cache.
This change makes HF_HUB_OFFLINE imply local_files_only for sharded checkpoint loading, preventing unnecessary Hub metadata requests in offline mode.
Which issue does this fix?
Fixes #14952
Motivation and context
Users running Diffusers in offline environments should be able to load cached sharded checkpoints without requiring network access.
The existing local_files_only behavior already supported this use case when explicitly enabled. This change makes the behavior consistent with the HF_HUB_OFFLINE environment setting.
What are the changes?
Tests
Focused regression test:
Existing related test:
Also verified:
Final self-review