Remove useless encoder weights reload

This commit is contained in:
Edresson Casanova 2022-03-31 11:05:58 -03:00
parent 721a81b1d8
commit d2b5db84f0
2 changed files with 3 additions and 4 deletions

View File

@ -722,8 +722,6 @@ class Vits(BaseTTS):
raise RuntimeError(
" [!] To use the speaker consistency loss (SCL) you need to specify encoder_model_path and encoder_config_path !!"
)
# load encoder
self.speaker_manager.init_encoder(self.args.encoder_model_path, self.args.encoder_config_path)
self.speaker_manager.encoder.eval()
print(" > External Speaker Encoder Loaded !!")
@ -744,8 +742,7 @@ class Vits(BaseTTS):
raise RuntimeError(
" [!] To use the emotion consistency loss (ECL) you need to specify encoder_model_path and encoder_config_path !!"
)
# load encoder
self.emotion_manager.init_encoder(self.args.encoder_model_path, self.args.encoder_config_path)
self.emotion_manager.encoder.eval()
print(" > External Emotion Encoder Loaded !!")

View File

@ -386,6 +386,8 @@ class TestVits(unittest.TestCase):
batch["d_vectors"] = None
batch["speaker_ids"] = None
batch["language_ids"] = None
batch["emotion_embeddings"] = None
batch["emotion_ids"] = None
return batch
def test_train_step(self):