Skip to content

Commit 520796a

Browse files
authored
fix token suppression (openai#123)
1 parent ead77fa commit 520796a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

whisper/decoding.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,7 @@ def _get_suppress_tokens(self) -> Tuple[int]:
537537
elif suppress_tokens is None or len(suppress_tokens) == 0:
538538
suppress_tokens = [] # interpret empty string as an empty list
539539
else:
540-
assert isinstance(self.options.suppress_tokens, list), "suppress_tokens must be a list"
541-
suppress_tokens = self.options.suppress_tokens
540+
assert isinstance(suppress_tokens, list), "suppress_tokens must be a list"
542541

543542
suppress_tokens.extend(
544543
[self.tokenizer.sot, self.tokenizer.sot_prev, self.tokenizer.sot_lm]

0 commit comments

Comments
 (0)