Resolve revision to commit_hash once per model load, via huggingface_hub's resolve_revision (#49990)
Signed-off-by: Wauplin <lucainp@gmail.com> Signed-off-by: Lucain <lucainp@gmail.com> Signed-off-by: Lucain Pouget <lucain@huggingface.co> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
OpenAI Codex
Claude Opus 5
Harry Mellor
parent
a9b39d6dcb
commit
397094da17
@@ -5553,7 +5553,10 @@ class GPUModelRunner(
|
||||
)
|
||||
|
||||
if weights_path is not None:
|
||||
# The revision belongs to the model we are reloading away from,
|
||||
# so it must not be carried over to the new path.
|
||||
self.model_config.model = weights_path
|
||||
self.model_config.revision = None
|
||||
weights_iterator = model_loader.get_all_weights(self.model_config, model)
|
||||
weights_iterator = cast(
|
||||
Iterable[tuple[str, torch.Tensor]], weights_iterator
|
||||
|
||||
Reference in New Issue
Block a user