SIGN IN SIGN UP

[Download] Resolve the revision once at the beginning of from_pretrained (#14340)

* Resolve the revision once at the beginning of from_pretrained

Use `huggingface_hub.resolve_revision` (new in huggingface_hub 1.26.0) at the
top of the loading entrypoints so that every file fetched afterwards is pinned
to the same commit and can be served from the cache without re-resolving the
revision on each call.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* less comments

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
L
Lucain committed
c1bf18c92c6285334adcaac7e75ef8946a227f49
Parent: 9f7aee4
Committed by GitHub <noreply@github.com> on 8/28/2026, 4:40:26 PM