Skip to content

Commit

Permalink
optimize(_apply_spk_emb): expand after F.normalize (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jun 28, 2024
1 parent 5b537f3 commit 5c421c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ChatTTS/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,14 @@ def _apply_spk_emb(
F.normalize(
torch.from_numpy(
self._decode_spk_emb(spk_emb),
)
.unsqueeze(0)
.expand(text_len, -1),
),
p=2.0,
dim=1,
dim=0,
eps=1e-12,
)
.to(self.gpt.device_gpt)
.unsqueeze_(0)
.expand(text_len, -1)
.unsqueeze_(1)
.expand(emb.shape)
)
Expand Down

0 comments on commit 5c421c9

Please sign in to comment.