diff --git a/tests/tts_tests/test_tacotron2_tf_model.py b/tests/tts_tests/test_tacotron2_tf_model.py index 431b0c2f..515a6834 100644 --- a/tests/tts_tests/test_tacotron2_tf_model.py +++ b/tests/tts_tests/test_tacotron2_tf_model.py @@ -38,6 +38,7 @@ class TacotronTFTrainTest(unittest.TestCase): mel_spec = tf.convert_to_tensor(mel_spec.cpu().numpy()) return chars_seq, chars_seq_lengths, mel_spec, mel_postnet_spec, mel_lengths, stop_targets, speaker_ids + @unittest.skipIf(use_cuda, " [!] Skip Test: TfLite conversion does not work on GPU.") def test_train_step(self): """test forward pass""" ( @@ -70,6 +71,7 @@ class TacotronTFTrainTest(unittest.TestCase): # inference pass output = model(chars_seq, training=False) + @unittest.skipIf(use_cuda, " [!] Skip Test: TfLite conversion does not work on GPU.") def test_forward_attention( self, ): @@ -103,6 +105,7 @@ class TacotronTFTrainTest(unittest.TestCase): # inference pass output = model(chars_seq, training=False) + @unittest.skipIf(use_cuda, " [!] Skip Test: TfLite conversion does not work on GPU.") def test_tflite_conversion( self, ): # pylint:disable=no-self-use diff --git a/tests/vocoder_tests/test_vocoder_tf_melgan_generator.py b/tests/vocoder_tests/test_vocoder_tf_melgan_generator.py index 67968225..225ceaf5 100644 --- a/tests/vocoder_tests/test_vocoder_tf_melgan_generator.py +++ b/tests/vocoder_tests/test_vocoder_tf_melgan_generator.py @@ -1,9 +1,15 @@ +import unittest + import numpy as np import tensorflow as tf +import torch from TTS.vocoder.tf.models.melgan_generator import MelganGenerator +use_cuda = torch.cuda.is_available() + +@unittest.skipIf(use_cuda, " [!] Skip Test: Loosy TF support.") def test_melgan_generator(): hop_length = 256 model = MelganGenerator() diff --git a/tests/vocoder_tests/test_vocoder_tf_pqmf.py b/tests/vocoder_tests/test_vocoder_tf_pqmf.py index f1c3666b..6acb20d9 100644 --- a/tests/vocoder_tests/test_vocoder_tf_pqmf.py +++ b/tests/vocoder_tests/test_vocoder_tf_pqmf.py @@ -1,7 +1,9 @@ import os +import unittest import soundfile as sf import tensorflow as tf +import torch from librosa.core import load from tests import get_tests_input_path, get_tests_output_path, get_tests_path @@ -9,8 +11,10 @@ from TTS.vocoder.tf.layers.pqmf import PQMF TESTS_PATH = get_tests_path() WAV_FILE = os.path.join(get_tests_input_path(), "example_1.wav") +use_cuda = torch.cuda.is_available() +@unittest.skipIf(use_cuda, " [!] Skip Test: Loosy TF support.") def test_pqmf(): w, sr = load(WAV_FILE)