mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-21 13:38:31 +06:00
[VITS] Only trigger tokenizer warning for uroman (#25915)
This commit is contained in:
parent
1fa2d89a9b
commit
3587769c08
@ -184,7 +184,7 @@ class VitsTokenizer(PreTrainedTokenizer):
|
|||||||
|
|
||||||
filtered_text = self._preprocess_char(text)
|
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(
|
logger.warning(
|
||||||
"Text to the tokenizer contains non-Roman characters. Ensure the `uroman` Romanizer is "
|
"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 "
|
"applied to the text prior to passing it to the tokenizer. See "
|
||||||
|
Loading…
Reference in New Issue
Block a user