Skip to content

Commit

Permalink
Rename load_meta to self.load_meta in inference.py (metavoiceio#75)
Browse files Browse the repository at this point in the history
`load_meta` is not defined and can introduce a runtime error when it is only assigned in a conditional branch.

Signed-off-by: Hongbo <12580159+ya0guang@users.noreply.github.com>
  • Loading branch information
ya0guang authored Feb 29, 2024
1 parent 001b82f commit 46571ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fam/llm/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def _init_model(self):
self.checkpoint_config = checkpoint["config"]

self.meta = checkpoint["meta"]
load_meta = True
self.load_meta = True

if load_meta:
if self.load_meta:
self.use_bpe_tokenizer = "stoi" not in self.meta or "itos" not in self.meta
self.speaker_cond = self.meta.get("speaker_cond")

Expand Down

0 comments on commit 46571ba

Please sign in to comment.