Skip to content

Commit 9821529

Browse files
tenderness-gitsir1st-inc
authored andcommitted
bug fix
1 parent 29967d6 commit 9821529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diffsynth_engine/utils/memory/memory_predcit_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def train(self, records: List[dict]):
8787
return r2
8888

8989
def save_model(self, model_path):
90-
with open(model_path, "wb", encoding="utf-8") as f:
90+
with open(model_path, "wb") as f:
9191
torch.save(
9292
{
9393
"key_inputs": self.key_inputs,
@@ -98,7 +98,7 @@ def save_model(self, model_path):
9898

9999
@classmethod
100100
def from_pretrained(cls, model_path):
101-
with open(model_path, "rb", encoding="utf-8") as f:
101+
with open(model_path, "rb") as f:
102102
data = torch.load(f)
103103
model = cls(data["key_inputs"])
104104
model.model = LinearRegression.deserialize(data["model"])

0 commit comments

Comments
 (0)