[TTS] Refactor BOS and EOS handling to fix codec conversion#15054
Closed
rlangman wants to merge 2 commits intoNVIDIA-NeMo:magpietts_2508from
Closed
[TTS] Refactor BOS and EOS handling to fix codec conversion#15054rlangman wants to merge 2 commits intoNVIDIA-NeMo:magpietts_2508from
rlangman wants to merge 2 commits intoNVIDIA-NeMo:magpietts_2508from
Conversation
c87e39e to
620903a
Compare
Signed-off-by: Ryan <rlangman@nvidia.com>
620903a to
5fb564c
Compare
d6f3a89 to
cd463a8
Compare
Collaborator
|
Closing, please make a new PR into main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in MagpieTTS training in which
self._codec_converter.convert_original_to_new()is being called on audio codec tokens after the Lhotse data loader has already pre-populated them with BOS and EOS tokens.The addition of BOS and EOS tokens is now always done inside the model class, after convert_original_to_new() is called. These tokens are also removed before
convert_new_to_original()is called, so that they are not mistakenly passed into the codec model.There are also a few other minor changes, including:
torch.catwith simpler call totorch.nn.functional.pad