Skip to content

Commit 035c0ce

Browse files
committed
fix issue with turning off discriminators in soundstream
1 parent 22b5f72 commit 035c0ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

audiolm_pytorch/soundstream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ def __init__(
545545
self.adversarial_loss_weight = adversarial_loss_weight
546546
self.feature_loss_weight = feature_loss_weight
547547

548+
self.register_buffer('zero', torch.tensor([0.]), persistent = False)
549+
548550
@property
549551
def configs(self):
550552
return pickle.loads(self._configs)
@@ -725,7 +727,7 @@ def forward(
725727

726728
# multispectral recon loss - eq (4) and (5) in https://arxiv.org/abs/2107.03312
727729

728-
multi_spectral_recon_loss = 0
730+
multi_spectral_recon_loss = self.zero
729731

730732
if self.multi_spectral_recon_loss_weight > 0:
731733
for mel_transform, alpha in zip(self.mel_spec_transforms, self.mel_spec_recon_alphas):

audiolm_pytorch/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.22.1'
1+
__version__ = '0.22.2'

0 commit comments

Comments
 (0)