use spk_embedding when sft

This commit is contained in:
lyuxiang.lx
2024-07-10 17:49:32 +08:00
parent a723ea375e
commit 0fd15bb12b
5 changed files with 8 additions and 2 deletions

View File

@@ -52,6 +52,10 @@ class Executor:
info_dict["batch_idx"] = batch_idx
if cosyvoice_join(group_join, info_dict):
break
if info_dict["use_spk_embedding"] is True:
batch_dict["embedding"] = batch_dict["spk_embedding"]
else:
batch_dict["embedding"] = batch_dict["utt_embedding"]
# Disable gradient synchronizations across DDP processes.
# Within this context, gradients will be accumulated on module