mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 09:10:25 +08:00
chore(format): run black on dev (#94)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a8783c6639
commit
d3add81469
@@ -166,9 +166,11 @@ class SineGenerator(torch.nn.Module):
|
||||
rad = f0 / self.sampling_rate * a
|
||||
rad2 = torch.fmod(rad[:, :-1, -1:].float() + 0.5, 1.0) - 0.5
|
||||
rad_acc = rad2.cumsum(dim=1).fmod(1.0).to(f0)
|
||||
rad += F.pad(rad_acc, (0, 0, 1, 0), mode='constant')
|
||||
rad += F.pad(rad_acc, (0, 0, 1, 0), mode="constant")
|
||||
rad = rad.reshape(f0.shape[0], -1, 1)
|
||||
b = torch.arange(1, self.dim + 1, dtype=f0.dtype, device=f0.device).reshape(1, 1, -1)
|
||||
b = torch.arange(1, self.dim + 1, dtype=f0.dtype, device=f0.device).reshape(
|
||||
1, 1, -1
|
||||
)
|
||||
rad *= b
|
||||
rand_ini = torch.rand(1, 1, self.dim, device=f0.device)
|
||||
rand_ini[..., 0] = 0
|
||||
|
||||
Reference in New Issue
Block a user