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
2fbbcf50
Unverified
Commit
2fbbcf50
authored
Jul 30, 2024
by
Yoach Lacombe
Committed by
GitHub
Jul 30, 2024
Browse files
Fix M4T for ASR pipeline (#32296)
* tentative fix * do the same for M4T
parent
084b5094
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
src/transformers/models/seamless_m4t/modeling_seamless_m4t.py
...transformers/models/seamless_m4t/modeling_seamless_m4t.py
+1
-0
src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py
...ormers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py
+1
-0
No files found.
src/transformers/models/seamless_m4t/modeling_seamless_m4t.py
View file @
2fbbcf50
...
...
@@ -3154,6 +3154,7 @@ class SeamlessM4TForSpeechToText(SeamlessM4TPreTrainedModel):
"""
text_decoder_input_ids
=
kwargs
.
pop
(
"decoder_input_ids"
,
None
)
# overwrite text_decoder_input_ids if tgt_lang is passed. The latter gets priority over decoder_input_ids.
input_features
=
input_features
if
input_features
is
not
None
else
kwargs
.
pop
(
"inputs"
)
if
tgt_lang
is
not
None
:
inputs
=
kwargs
.
get
(
"input_embeds"
)
if
input_features
is
None
else
input_features
inputs
=
(
...
...
src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py
View file @
2fbbcf50
...
...
@@ -3422,6 +3422,7 @@ class SeamlessM4Tv2ForSpeechToText(SeamlessM4Tv2PreTrainedModel):
"""
text_decoder_input_ids
=
kwargs
.
pop
(
"decoder_input_ids"
,
None
)
# overwrite text_decoder_input_ids if tgt_lang is passed. The latter gets priority over decoder_input_ids.
input_features
=
input_features
if
input_features
is
not
None
else
kwargs
.
pop
(
"inputs"
)
if
tgt_lang
is
not
None
:
inputs
=
kwargs
.
get
(
"input_embeds"
)
if
input_features
is
None
else
input_features
inputs
=
(
...
...
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