mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2026-07-13 03:21:07 +08:00
Compare commits
3 Commits
32e76bdd4f
...
c2f9aaa34e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2f9aaa34e | ||
|
|
ed89a02337 | ||
|
|
a4323233c6 |
@ -364,6 +364,7 @@ class TTS_Config:
|
||||
configs = deepcopy(self.default_configs)
|
||||
if self.configs is not None:
|
||||
configs["custom"] = self.update_configs()
|
||||
configs["version"] = self.version
|
||||
|
||||
if configs_path is None:
|
||||
configs_path = self.configs_path
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import math
|
||||
import pdb
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from torch import nn
|
||||
@ -716,11 +718,11 @@ class MelStyleEncoder(nn.Module):
|
||||
if mask is None:
|
||||
out = torch.mean(x, dim=1)
|
||||
else:
|
||||
len_ = (~mask).sum()
|
||||
len_ = (~mask).sum(dim=1).unsqueeze(1)
|
||||
x = x.masked_fill(mask.unsqueeze(-1), 0)
|
||||
dtype=x.dtype
|
||||
x = x.float()
|
||||
x=torch.div(x,len_)
|
||||
x=torch.div(x,len_.unsqueeze(1))
|
||||
out=x.sum(dim=1).to(dtype)
|
||||
return out
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user