File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,10 +27,7 @@ Software version configuration tested for the instructions that follow:
27272 . Install prerequisite software for TTS sample:
2828 ``` bash
2929 cd $TRT_SOURCE /demo/Tacotron2
30-
31- export LD_LIBRARY_PATH=$TRT_SOURCE /build/out:/tensorrt/lib:$LD_LIBRARY_PATH
3230 pip3 install /tensorrt/python/tensorrt-7.2* -cp36-none-linux_x86_64.whl
33-
3431 bash ./scripts/install_prerequisites.sh
3532 ```
36333. Download pretrained checkpoints from [NGC](https://ngc.nvidia.com/catalog/models) into the ` ./checkpoints` directory:
@@ -48,13 +45,13 @@ Software version configuration tested for the instructions that follow:
4845
4946 ` ` ` bash
5047 mkdir -p output
51- python3 exports/export_tacotron2_onnx.py --tacotron2 ./checkpoints/tacotron2pyt_fp16_v3/tacotron2_1032590_6000_amp -o output/ --fp16
48+ python3 exports/export_tacotron2_onnx.py --tacotron2 ./checkpoints/tacotron2_pyt_ckpt_amp_v19.09.0/nvidia_tacotron2pyt_fp16_20190427 -o output/ --fp16
5249 ` ` `
5350
5451 Export WaveGlow to ONNX IR:
5552
5653 ` ` ` bash
57- python3 exports/export_waveglow_onnx.py --waveglow checkpoints/waveglow256pyt_fp16_v2/waveglow_1076430_14000_amp --wn-channels 256 -o output/ --fp16
54+ python3 exports/export_waveglow_onnx.py --waveglow ./ checkpoints/waveglow_ckpt_amp_256_v19.10.0/nvidia_waveglow256pyt_fp16 --wn-channels 256 -o output/ --fp16
5855 ` ` `
5956
6057 After running the above commands, there should be four new ONNX files in ` ./output/` directory:
Original file line number Diff line number Diff line change 1919mkdir -p checkpoints && cd checkpoints
2020
2121# Download the Tacotron2 and Waveglow checkpoints
22- if [ ! -f " checkpoints/tacotron2pyt_fp16_v3/tacotron2_1032590_6000_amp " ]; then
23- echo " Downloading Tacotron2 fp16 checkpoint from NGC"
24- ngc registry model download-version nvidia/tacotron2pyt_fp16:3
22+ if [ ! -f " checkpoints/tacotron2_pyt_ckpt_amp_v19.09.0/nvidia_tacotron2pyt_fp16_20190427 " ]; then
23+ echo " Downloading Tacotron2 checkpoint from NGC"
24+ ngc registry model download-version nvidia/tacotron2_pyt_ckpt_amp:19.09.0
2525fi ;
26- if [ ! -f " checkpoints/waveglow256pyt_fp16_v2/waveglow_1076430_14000_amp " ]; then
27- echo " Downloading Waveglow fp16 checkpoint from NGC"
28- ngc registry model download-version nvidia/waveglow256pyt_fp16:2
26+ if [ ! -f " checkpoints/waveglow_ckpt_amp_256_v19.10.0/nvidia_waveglow256pyt_fp16 " ]; then
27+ echo " Downloading Waveglow checkpoint from NGC"
28+ ngc registry model download-version nvidia/waveglow_ckpt_amp_256:19.10.0
2929fi ;
3030
3131cd -
Original file line number Diff line number Diff line change 1818echo " TensorRT BS=1, S=128"
1919bash test_infer.sh --test trt/test_infer_trt.py -bs 1 -il 128 --fp16 --num-iters 1003 --encoder ./output/encoder_fp16.engine --decoder ./output/decoder_iter_fp16.engine --postnet ./output/postnet_fp16.engine --waveglow ./output/waveglow_fp16.engine --wn-channels 256
2020echo " PyTorch (GPU) BS=1, S=128"
21- bash test_infer.sh -bs 1 -il 128 --fp16 --num-iters 1003 --tacotron2 ./checkpoints/tacotron2pyt_fp16_v3/tacotron2_1032590_6000_amp --waveglow ./checkpoints/waveglow256pyt_fp16_v2/waveglow_1076430_14000_amp --wn-channels 256
21+ bash test_infer.sh -bs 1 -il 128 --fp16 --num-iters 1003 --tacotron2 ./checkpoints/tacotron2_pyt_ckpt_amp_v19.09.0/nvidia_tacotron2pyt_fp16_20190427 --waveglow ./checkpoints/waveglow_ckpt_amp_256_v19.10.0/nvidia_waveglow256pyt_fp16 --wn-channels 256
Original file line number Diff line number Diff line change 1717
1818pip3 install numba==0.48 torch==1.4.0
1919pip3 install -r requirements.txt
20- sudo apt-get install -y libsndfile1
20+ echo " nvidia " | sudo -S apt-get install -y libsndfile1
2121
2222pushd /tmp
2323git clone https://github.com/NVIDIA/apex
Original file line number Diff line number Diff line change 1818BATCH_SIZE=1
1919INPUT_LENGTH=128
2020NUM_ITERS=1003 # extra 3 iterations for warmup
21- TACOTRON2_CKPT=" tacotron2_1032590_6000_amp "
22- WAVEGLOW_CKPT=" waveglow_1076430_14000_amp "
21+ TACOTRON2_CKPT=" nvidia_tacotron2pyt_fp16_20190427 "
22+ WAVEGLOW_CKPT=" nvidia_waveglow256pyt_fp16 "
2323RUN_MODE=" " # = fp32
2424LOG_RUN_MODE=" gpu_fp32"
2525TEST_PROGRAM=" test_infer.py"
You can’t perform that action at this time.
0 commit comments