Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
dhruva-iitm-tts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ssmt
dhruva-iitm-tts
Commits
9e7cad28
Commit
9e7cad28
authored
Nov 01, 2023
by
Nikhilesh Bhatnagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes. Increased input seq length
parent
7d911f76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
make_triton_repo.sh
make_triton_repo.sh
+1
-0
patches/espnet_onnx.patch
patches/espnet_onnx.patch
+35
-0
triton_models/tts/1/model.py
triton_models/tts/1/model.py
+2
-2
triton_models/tts/envbuilder.sh
triton_models/tts/envbuilder.sh
+1
-1
No files found.
make_triton_repo.sh
View file @
9e7cad28
...
@@ -6,5 +6,6 @@ nvidia-docker run --gpus=all -it --rm --name iitm-tts-dhruva-builder -v ./Fastsp
...
@@ -6,5 +6,6 @@ nvidia-docker run --gpus=all -it --rm --name iitm-tts-dhruva-builder -v ./Fastsp
mkdir
triton_model_repo
mkdir
triton_model_repo
nvidia-docker run
--gpus
=
all
-it
--rm
--name
iitm-tts-dhruva-builder
-v
./patches:/patches
-v
./triton_models/tts:/model
-v
./triton_model_repo:/model_repo dhruva/iitm-tts-envbuilder bash /model/envbuilder.sh
nvidia-docker run
--gpus
=
all
-it
--rm
--name
iitm-tts-dhruva-builder
-v
./patches:/patches
-v
./triton_models/tts:/model
-v
./triton_model_repo:/model_repo dhruva/iitm-tts-envbuilder bash /model/envbuilder.sh
cp
Fastspeech2_HS/text_preprocess_for_inference.py triton_model_repo/tts/1
cp
Fastspeech2_HS/text_preprocess_for_inference.py triton_model_repo/tts/1
cp
Fastspeech2_HS/get_phone_mapped_python.py triton_model_repo/tts/1
cp
-r
triton_models/tts/config.pbtxt triton_models/tts/1 triton_model_repo/tts
cp
-r
triton_models/tts/config.pbtxt triton_models/tts/1 triton_model_repo/tts
cp
-r
onnx_models/
*
Fastspeech2_HS/phone_dict Fastspeech2_HS/multilingualcharmap.json triton_model_repo/tts/1
cp
-r
onnx_models/
*
Fastspeech2_HS/phone_dict Fastspeech2_HS/multilingualcharmap.json triton_model_repo/tts/1
\ No newline at end of file
patches/espnet_onnx.patch
View file @
9e7cad28
diff --git a/espnet_onnx/export/tts/models/tts_models/fastspeech2.py b/espnet_onnx/export/tts/models/tts_models/fastspeech2.py
index 29197e2..0022e51 100644
--- a/espnet_onnx/export/tts/models/tts_models/fastspeech2.py
+++ b/espnet_onnx/export/tts/models/tts_models/fastspeech2.py
@@ -10,7 +10,7 @@
from espnet_onnx.utils.torch_function import MakePadMask, normalize
class OnnxLengthRegurator(nn.Module):
- def __init__(self, alpha=1.0, max_seq_len=512):
+ def __init__(self, alpha=1.0, max_seq_len=1000):
super().__init__()
self.alpha = alpha
# The maximum length of the make_pad_mask is the
@@ -59,7 +59,7 @@
class OnnxFastSpeech2(nn.Module, AbsExportModel):
def __init__(
self,
model,
- max_seq_len: int = 512,
+ max_seq_len: int = 1000,
alpha: float = 1.0,
use_cache: bool = True,
**kwargs,
diff --git a/espnet_onnx/tts/abs_tts_model.py b/espnet_onnx/tts/abs_tts_model.py
diff --git a/espnet_onnx/tts/abs_tts_model.py b/espnet_onnx/tts/abs_tts_model.py
index 591947a..9de64a5 100644
index 591947a..9de64a5 100644
--- a/espnet_onnx/tts/abs_tts_model.py
--- a/espnet_onnx/tts/abs_tts_model.py
...
@@ -84,6 +106,19 @@ index 1270468..4aa63c6 100644
...
@@ -84,6 +106,19 @@ index 1270468..4aa63c6 100644
class AbsExportModel(ABC):
class AbsExportModel(ABC):
diff --git a/espnet_onnx/utils/torch_function.py b/espnet_onnx/utils/torch_function.py
index c274346..f88f8bc 100644
--- a/espnet_onnx/utils/torch_function.py
+++ b/espnet_onnx/utils/torch_function.py
@@ -6,7 +6,7 @@
import torch.nn as nn
class MakePadMask(nn.Module):
- def __init__(self, max_seq_len=512, flip=True):
+ def __init__(self, max_seq_len=1000, flip=True):
super().__init__()
if flip:
self.mask_pad = torch.Tensor(1 - np.tri(max_seq_len)).type(torch.bool)
diff --git a/setup.py b/setup.py
diff --git a/setup.py b/setup.py
index 483b062..ee37d37 100644
index 483b062..ee37d37 100644
--- a/setup.py
--- a/setup.py
...
...
triton_models/tts/1/model.py
View file @
9e7cad28
...
@@ -79,7 +79,7 @@ class TritonPythonModel:
...
@@ -79,7 +79,7 @@ class TritonPythonModel:
providers
=
[
providers
=
[
"CPUExecutionProvider"
"CPUExecutionProvider"
if
device
==
"cpu"
if
device
==
"cpu"
else
(
"CUDAExecutionProvider"
,
{
"device_id"
:
self
.
device_id
})
else
(
"CUDAExecutionProvider"
,
{
"device_id"
:
self
.
device_id
,
"arena_extend_strategy"
:
"kSameAsRequested"
})
],
],
)
)
...
@@ -88,7 +88,7 @@ class TritonPythonModel:
...
@@ -88,7 +88,7 @@ class TritonPythonModel:
providers
=
[
providers
=
[
"CPUExecutionProvider"
"CPUExecutionProvider"
if
device
==
"cpu"
if
device
==
"cpu"
else
(
"CUDAExecutionProvider"
,
{
"device_id"
:
self
.
device_id
})
else
(
"CUDAExecutionProvider"
,
{
"device_id"
:
self
.
device_id
,
"arena_extend_strategy"
:
"kSameAsRequested"
})
],
],
model_dir
=
f"text2phone/
{
language
}
-
{
gender
}
-ort"
,
model_dir
=
f"text2phone/
{
language
}
-
{
gender
}
-ort"
,
use_quantized
=
True
,
use_quantized
=
True
,
...
...
triton_models/tts/envbuilder.sh
View file @
9e7cad28
...
@@ -11,7 +11,7 @@ conda activate tts
...
@@ -11,7 +11,7 @@ conda activate tts
mamba
install
-c
"nvidia/label/cuda-11.8.0"
libcublas libcufft cuda-cudart
-y
mamba
install
-c
"nvidia/label/cuda-11.8.0"
libcublas libcufft cuda-cudart
-y
git clone
--recursive
https://github.com/espnet/espnet_onnx.git
git clone
--recursive
https://github.com/espnet/espnet_onnx.git
cd
espnet_onnx
&&
git apply /patches/espnet_onnx.patch
&&
python setup.py bdist_wheel
&&
cd
..
cd
espnet_onnx
&&
git apply /patches/espnet_onnx.patch
&&
python setup.py bdist_wheel
&&
cd
..
pip
install
-U
numpy pandas nltk indic-num2words g2p_en
"espnet_onnx/dist/espnet_onnx-0.2.0-py3-none-any.whl"
pip
install
-U
numpy pandas nltk indic-num2words g2p_en
"espnet_onnx/dist/espnet_onnx-0.2.0-py3-none-any.whl"
indic-unified-parser
conda deactivate
conda deactivate
conda pack
-n
tts
conda pack
-n
tts
conda activate tts
conda activate tts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment