Remove useless encoder weights reload

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

View File

@ -677,8 +677,6 @@ class Vits(BaseTTS):
" [!] To use the speaker consistency loss (SCL) you need to specify encoder_model_path and encoder_config_path !!" " [!] 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() self.speaker_manager.encoder.eval()
print(" > External Speaker Encoder Loaded !!") print(" > External Speaker Encoder Loaded !!")
@ -699,8 +697,7 @@ class Vits(BaseTTS):
raise RuntimeError( raise RuntimeError(
" [!] To use the emotion consistency loss (ECL) you need to specify encoder_model_path and encoder_config_path !!" " [!] 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() self.emotion_manager.encoder.eval()
print(" > External Emotion Encoder Loaded !!") print(" > External Emotion Encoder Loaded !!")

View File

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