Skip to content

Commit

Permalink
[VITS] Only trigger tokenizer warning for uroman (huggingface#25915)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi authored and parambharat committed Sep 26, 2023
1 parent 3f5004c commit 2042ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/vits/tokenization_vits.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def prepare_for_tokenization(

filtered_text = self._preprocess_char(text)

if has_non_roman_characters(filtered_text):
if has_non_roman_characters(filtered_text) and self.is_uroman:
logger.warning(
"Text to the tokenizer contains non-Roman characters. Ensure the `uroman` Romanizer is "
"applied to the text prior to passing it to the tokenizer. See "
Expand Down

0 comments on commit 2042ec6

Please sign in to comment.