Skip to content

SOTA Open Source TTS

Optimize loss sync

Lengyue39a79a2c9865
diff --git a/fish_speech/models/text2semantic/lit_module.py b/fish_speech/models/text2semantic/lit_module.py
index de759bc..56da635 100644
--- a/fish_speech/models/text2semantic/lit_module.py
+++ b/fish_speech/models/text2semantic/lit_module.py
@@ -244,6 +244,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -253,6 +254,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -262,6 +264,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -271,6 +274,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -280,6 +284,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=True,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -289,6 +294,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
self.log(
@@ -298,6 +304,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=False,
logger=True,
+ sync_dist=not is_train,
)
# Top-5 accuracy
@@ -309,6 +316,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=True,
logger=True,
+ sync_dist=not is_train,
)
if self.model.config.num_codebooks != self.model.config.num_in_codebooks:
@@ -324,6 +332,7 @@ class TextToSemantic(L.LightningModule):
on_epoch=not is_train,
prog_bar=True,
logger=True,
+ sync_dist=not is_train,
)
return loss