Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
3587769c
Unverified
Commit
3587769c
authored
Sep 01, 2023
by
Sanchit Gandhi
Committed by
GitHub
Sep 01, 2023
Browse files
[VITS] Only trigger tokenizer warning for uroman (#25915)
parent
1fa2d89a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/vits/tokenization_vits.py
src/transformers/models/vits/tokenization_vits.py
+1
-1
No files found.
src/transformers/models/vits/tokenization_vits.py
View file @
3587769c
...
@@ -184,7 +184,7 @@ class VitsTokenizer(PreTrainedTokenizer):
...
@@ -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 "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment