mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
[TTA Pipeline] Test MusicGen and VITS (#26146)
This commit is contained in:
parent
869733ab62
commit
d70fab8b20
@ -502,7 +502,7 @@ class MusicgenTester:
|
||||
class MusicgenTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
||||
all_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_headmasking = False
|
||||
test_resize_embeddings = False
|
||||
|
@ -40,6 +40,7 @@ from ...test_modeling_common import (
|
||||
ids_tensor,
|
||||
random_attention_mask,
|
||||
)
|
||||
from ...test_pipeline_mixin import PipelineTesterMixin
|
||||
|
||||
|
||||
if is_torch_available():
|
||||
@ -153,8 +154,9 @@ class VitsModelTester:
|
||||
|
||||
|
||||
@require_torch
|
||||
class VitsModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
class VitsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
||||
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
|
||||
test_pruning = False
|
||||
test_headmasking = False
|
||||
|
Loading…
Reference in New Issue
Block a user