Change the VITS upsampling interpolation trick to linear (#1564)

This commit is contained in:
Edresson Casanova 2022-05-13 05:52:39 -03:00 committed by GitHub
parent c6008e5235
commit e5d8ec2402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -890,9 +890,7 @@ class Vits(BaseTTS):
spec_segment_size = spec_segment_size * int(self.interpolate_factor)
# interpolate z if needed
if self.args.interpolate_z:
z = torch.nn.functional.interpolate(
z.unsqueeze(0), scale_factor=[1, self.interpolate_factor], mode="nearest"
).squeeze(0)
z = torch.nn.functional.interpolate(z, scale_factor=[self.interpolate_factor], mode="linear").squeeze(0)
# recompute the mask if needed
if y_lengths is not None and y_mask is not None:
y_mask = (