From 39db799bf1855df1b271da5fb69eafe174aa8841 Mon Sep 17 00:00:00 2001 From: nclok1405 <155463060+nclok1405@users.noreply.github.com> Date: Wed, 22 May 2024 09:54:35 +0900 Subject: [PATCH] Added UnicodeDecodeError workaround for modules/llamacpp_model.py --- modules/llamacpp_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/llamacpp_model.py b/modules/llamacpp_model.py index b2a25d36..659fb395 100644 --- a/modules/llamacpp_model.py +++ b/modules/llamacpp_model.py @@ -114,7 +114,7 @@ class LlamaCppModel: return self.model.tokenize(string) def decode(self, ids, **kwargs): - return self.model.detokenize(ids).decode('utf-8') + return self.model.detokenize(ids).decode('utf-8', 'replace') def get_logits(self, tokens): self.model.reset()