Skip to content

Commit

Permalink
Merge pull request #19 from recursionpharma/fix-minor-issue
Browse files Browse the repository at this point in the history
Update huggingface_mae.py
  • Loading branch information
Laksh47 authored Nov 11, 2024
2 parents 42cfc25 + cd331d8 commit 9169d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion huggingface_mae.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,6 @@ def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
modelpath = f"{pretrained_model_name_or_path}/{filename}"
config = MAEConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
state_dict = torch.load(modelpath, map_location="cpu")
model = cls(config, *model_args, **kwargs)
model = cls(config)
model.load_state_dict(state_dict["state_dict"])
return model

0 comments on commit 9169d47

Please sign in to comment.