From 105d2a470a4e595cd7865a7b23c5d0c0ab58fe1c Mon Sep 17 00:00:00 2001 From: Phil Wang Date: Fri, 12 May 2023 18:55:00 -0700 Subject: [PATCH] curtail from the left when the prompt is being encoded, only works for soundstream for now --- naturalspeech2_pytorch/naturalspeech2_pytorch.py | 2 +- naturalspeech2_pytorch/version.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/naturalspeech2_pytorch/naturalspeech2_pytorch.py b/naturalspeech2_pytorch/naturalspeech2_pytorch.py index 8e2beae..cef9344 100644 --- a/naturalspeech2_pytorch/naturalspeech2_pytorch.py +++ b/naturalspeech2_pytorch/naturalspeech2_pytorch.py @@ -1074,7 +1074,7 @@ def process_prompt(self, prompt = None): if is_raw_prompt: with torch.no_grad(): self.codec.eval() - prompt, _, _ = self.codec(prompt, return_encoded = True) + prompt, _, _ = self.codec(prompt, curtail_from_left = True, return_encoded = True) return prompt diff --git a/naturalspeech2_pytorch/version.py b/naturalspeech2_pytorch/version.py index 858d0a1..af2cb9a 100644 --- a/naturalspeech2_pytorch/version.py +++ b/naturalspeech2_pytorch/version.py @@ -1 +1 @@ -__version__ = '0.0.25' +__version__ = '0.0.26' diff --git a/setup.py b/setup.py index 69caed4..48c640b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ ], install_requires=[ 'accelerate', - 'audiolm-pytorch>=0.30.0', + 'audiolm-pytorch>=0.30.2', 'beartype', 'einops>=0.6.1', 'ema-pytorch',