fix embedding model load error

repair a compatibility error , this error cause some embedding model could save but can`t be load correctly
This commit is contained in:
南辰燏炚 2024-05-13 16:59:17 +08:00 committed by GitHub
parent 1c0a0c4c26
commit 9700d368ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Embedding:
"sd_checkpoint_name": self.sd_checkpoint_name,
}
torch.save(embedding_data, filename)
torch.save(embedding_data, filename, _use_new_zipfile_serialization=False)
if shared.opts.save_optimizer_state and self.optimizer_state_dict is not None:
optimizer_saved_dict = {