Skip to content

Comments

Assume LFS OID is SHA256 value if SHA256 field missing from LFS Info.#61

Open
jaystevens wants to merge 1 commit intobodaay:masterfrom
jaystevens:lfs_sha256_fix_v231
Open

Assume LFS OID is SHA256 value if SHA256 field missing from LFS Info.#61
jaystevens wants to merge 1 commit intobodaay:masterfrom
jaystevens:lfs_sha256_fix_v231

Conversation

@jaystevens
Copy link

This fix allows models that have been updated in their repo to be detected as hash mismatch and re-downloaded.

The Hugging face api does not have a field 'SHA' or 'SHA256' on LFS files. The LFS oid is the SHA256 hash of the file so use that when the LFS SHA256 is missing, which it always will be.
Api example: https://huggingface.co/api/models/Qwen/Qwen3-0.6B/tree/main

This fix allows models that have been updated in their repo to be detected as hash mismatch and re-downloaded.

The Hugging face api does not have a field 'SHA' or 'SHA256' on LFS files.
The LFS oid is the SHA256 hash of the file so use that when the LFS SHA256 is missing, which it always will be.
Api example: https://huggingface.co/api/models/Qwen/Qwen3-0.6B/tree/main
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.

1 participant