Skip to content

Commit

Permalink
fix embedding model load error
Browse files Browse the repository at this point in the history
repair a compatibility error , this error cause some embedding model could save but can`t be load correctly
  • Loading branch information
LingXuanYin authored May 13, 2024
1 parent 9700d36 commit 0e7caff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/textual_inversion/textual_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def save(self, filename):
'hash': self.checksum(),
'optimizer_state_dict': self.optimizer_state_dict,
}
torch.save(optimizer_saved_dict, f"{filename}.optim")
torch.save(optimizer_saved_dict, f"{filename}.optim", _use_new_zipfile_serialization=False)

def checksum(self):
if self.cached_checksum is not None:
Expand Down

0 comments on commit 0e7caff

Please sign in to comment.