Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
d70fab8b
Unverified
Commit
d70fab8b
authored
Sep 15, 2023
by
Sanchit Gandhi
Committed by
GitHub
Sep 15, 2023
Browse files
[TTA Pipeline] Test MusicGen and VITS (#26146)
parent
869733ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
tests/models/musicgen/test_modeling_musicgen.py
tests/models/musicgen/test_modeling_musicgen.py
+1
-1
tests/models/vits/test_modeling_vits.py
tests/models/vits/test_modeling_vits.py
+3
-1
No files found.
tests/models/musicgen/test_modeling_musicgen.py
View file @
d70fab8b
...
@@ -502,7 +502,7 @@ class MusicgenTester:
...
@@ -502,7 +502,7 @@ class MusicgenTester:
class
MusicgenTest
(
ModelTesterMixin
,
GenerationTesterMixin
,
PipelineTesterMixin
,
unittest
.
TestCase
):
class
MusicgenTest
(
ModelTesterMixin
,
GenerationTesterMixin
,
PipelineTesterMixin
,
unittest
.
TestCase
):
all_model_classes
=
(
MusicgenForConditionalGeneration
,)
if
is_torch_available
()
else
()
all_model_classes
=
(
MusicgenForConditionalGeneration
,)
if
is_torch_available
()
else
()
greedy_sample_model_classes
=
(
MusicgenForConditionalGeneration
,)
if
is_torch_available
()
else
()
greedy_sample_model_classes
=
(
MusicgenForConditionalGeneration
,)
if
is_torch_available
()
else
()
pipeline_model_mapping
=
{}
pipeline_model_mapping
=
{
"text-to-audio"
:
MusicgenForConditionalGeneration
}
if
is_torch_available
()
else
{}
test_pruning
=
False
# training is not supported yet for MusicGen
test_pruning
=
False
# training is not supported yet for MusicGen
test_headmasking
=
False
test_headmasking
=
False
test_resize_embeddings
=
False
test_resize_embeddings
=
False
...
...
tests/models/vits/test_modeling_vits.py
View file @
d70fab8b
...
@@ -40,6 +40,7 @@ from ...test_modeling_common import (
...
@@ -40,6 +40,7 @@ from ...test_modeling_common import (
ids_tensor
,
ids_tensor
,
random_attention_mask
,
random_attention_mask
,
)
)
from
...test_pipeline_mixin
import
PipelineTesterMixin
if
is_torch_available
():
if
is_torch_available
():
...
@@ -153,8 +154,9 @@ class VitsModelTester:
...
@@ -153,8 +154,9 @@ class VitsModelTester:
@
require_torch
@
require_torch
class
VitsModelTest
(
ModelTesterMixin
,
unittest
.
TestCase
):
class
VitsModelTest
(
ModelTesterMixin
,
PipelineTesterMixin
,
unittest
.
TestCase
):
all_model_classes
=
(
VitsModel
,)
if
is_torch_available
()
else
()
all_model_classes
=
(
VitsModel
,)
if
is_torch_available
()
else
()
pipeline_model_mapping
=
{
"text-to-audio"
:
VitsModel
}
if
is_torch_available
()
else
{}
is_encoder_decoder
=
False
is_encoder_decoder
=
False
test_pruning
=
False
test_pruning
=
False
test_headmasking
=
False
test_headmasking
=
False
...
...
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