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
c817c17d
Unverified
Commit
c817c17d
authored
Dec 15, 2023
by
Yoach Lacombe
Committed by
GitHub
Dec 15, 2023
Browse files
Remove SpeechT5 deprecated argument (#28062)
parent
6af3ce77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
src/transformers/models/speecht5/modeling_speecht5.py
src/transformers/models/speecht5/modeling_speecht5.py
+0
-15
No files found.
src/transformers/models/speecht5/modeling_speecht5.py
View file @
c817c17d
...
...
@@ -15,7 +15,6 @@
""" PyTorch SpeechT5 model."""
import
math
import
warnings
from
typing
import
List
,
Optional
,
Tuple
,
Union
import
numpy
as
np
...
...
@@ -2656,7 +2655,6 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
return_dict
:
Optional
[
bool
]
=
None
,
speaker_embeddings
:
Optional
[
torch
.
FloatTensor
]
=
None
,
labels
:
Optional
[
torch
.
FloatTensor
]
=
None
,
stop_labels
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
Union
[
Tuple
,
Seq2SeqSpectrogramOutput
]:
r
"""
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
...
...
@@ -2704,12 +2702,6 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
"""
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
if
stop_labels
is
not
None
:
warnings
.
warn
(
"The argument `stop_labels` is deprecated and will be removed in version 4.30.0 of Transformers"
,
FutureWarning
,
)
if
labels
is
not
None
:
if
decoder_input_values
is
None
:
decoder_input_values
=
shift_spectrograms_right
(
labels
,
self
.
config
.
reduction_factor
)
...
...
@@ -2981,7 +2973,6 @@ class SpeechT5ForSpeechToSpeech(SpeechT5PreTrainedModel):
return_dict
:
Optional
[
bool
]
=
None
,
speaker_embeddings
:
Optional
[
torch
.
FloatTensor
]
=
None
,
labels
:
Optional
[
torch
.
FloatTensor
]
=
None
,
stop_labels
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
Union
[
Tuple
,
Seq2SeqSpectrogramOutput
]:
r
"""
input_values (`torch.FloatTensor` of shape `(batch_size, sequence_length)`):
...
...
@@ -3035,12 +3026,6 @@ class SpeechT5ForSpeechToSpeech(SpeechT5PreTrainedModel):
"""
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
if
stop_labels
is
not
None
:
warnings
.
warn
(
"The argument `stop_labels` is deprecated and will be removed in version 4.30.0 of Transformers"
,
FutureWarning
,
)
if
labels
is
not
None
:
if
decoder_input_values
is
None
:
decoder_input_values
=
shift_spectrograms_right
(
labels
,
self
.
config
.
reduction_factor
)
...
...
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