Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com>
  • Loading branch information
borisfom committed Feb 9, 2023
1 parent e140b7f commit 989f0ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions nemo/collections/tts/modules/radtts.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ def infer(
self,
speaker_id,
text,
sigma=0.0,
sigma_txt=0.0,
sigma=0.7,
sigma_txt=0.7,
sigma_f0=1.0,
sigma_energy=1.0,
speaker_id_text=None,
Expand Down
1 change: 0 additions & 1 deletion tests/collections/tts/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import pytest
import torch
from omegaconf import DictConfig

from nemo.collections.tts.helpers.helpers import regulate_len

Expand Down
16 changes: 6 additions & 10 deletions tests/collections/tts/test_tts_exportables.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def test_RadTTSModel_export_to_torchscript(self, radtts_model):
with tempfile.TemporaryDirectory() as tmpdir:
filename = os.path.join(tmpdir, 'rad.ts')
with torch.cuda.amp.autocast(enabled=True, cache_enabled=False, dtype=torch.float16):
input_example1 = model.input_module.input_example(max_batch=3, max_dim=777)
input_example2 = model.input_module.input_example(max_batch=16, max_dim=1024)
input_example1 = model.input_module.input_example(max_batch=13, max_dim=777)
input_example2 = model.input_module.input_example(max_batch=19, max_dim=999)
model.export(output=filename, verbose=True, input_example=input_example1, check_trace=[input_example2])

@pytest.mark.run_only_on('GPU')
Expand All @@ -91,13 +91,9 @@ def test_RadTTSModel_export_to_onnx(self, radtts_model):
model = radtts_model.cuda()
with tempfile.TemporaryDirectory() as tmpdir:
filename = os.path.join(tmpdir, 'rad.onnx')
with torch.cuda.amp.autocast(enabled=False):
input_example1 = model.input_module.input_example(max_batch=3, max_dim=776)
input_example2 = model.input_module.input_example(max_batch=16, max_dim=998)
with torch.cuda.amp.autocast(enabled=True, cache_enabled=False, dtype=torch.float16):
input_example1 = model.input_module.input_example(max_batch=13, max_dim=777)
input_example2 = model.input_module.input_example(max_batch=19, max_dim=999)
model.export(
output=filename,
input_example=input_example1,
verbose=True,
check_trace=[input_example2],
onnx_opset_version=14,
output=filename, input_example=input_example1, verbose=True, check_trace=[input_example2],
)

0 comments on commit 989f0ee

Please sign in to comment.