diff --git a/demo/Tacotron2/README.md b/demo/Tacotron2/README.md index 724f584a..b5217b3d 100644 --- a/demo/Tacotron2/README.md +++ b/demo/Tacotron2/README.md @@ -27,10 +27,7 @@ Software version configuration tested for the instructions that follow: 2. Install prerequisite software for TTS sample: ```bash cd $TRT_SOURCE/demo/Tacotron2 - - export LD_LIBRARY_PATH=$TRT_SOURCE/build/out:/tensorrt/lib:$LD_LIBRARY_PATH pip3 install /tensorrt/python/tensorrt-7.2*-cp36-none-linux_x86_64.whl - bash ./scripts/install_prerequisites.sh ``` 3. 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: ```bash mkdir -p output - python3 exports/export_tacotron2_onnx.py --tacotron2 ./checkpoints/tacotron2pyt_fp16_v3/tacotron2_1032590_6000_amp -o output/ --fp16 + python3 exports/export_tacotron2_onnx.py --tacotron2 ./checkpoints/tacotron2_pyt_ckpt_amp_v19.09.0/nvidia_tacotron2pyt_fp16_20190427 -o output/ --fp16 ``` Export WaveGlow to ONNX IR: ```bash - python3 exports/export_waveglow_onnx.py --waveglow checkpoints/waveglow256pyt_fp16_v2/waveglow_1076430_14000_amp --wn-channels 256 -o output/ --fp16 + python3 exports/export_waveglow_onnx.py --waveglow ./checkpoints/waveglow_ckpt_amp_256_v19.10.0/nvidia_waveglow256pyt_fp16 --wn-channels 256 -o output/ --fp16 ``` After running the above commands, there should be four new ONNX files in `./output/` directory: diff --git a/demo/Tacotron2/scripts/download_checkpoints.sh b/demo/Tacotron2/scripts/download_checkpoints.sh index 002360b7..b6e0ef13 100755 --- a/demo/Tacotron2/scripts/download_checkpoints.sh +++ b/demo/Tacotron2/scripts/download_checkpoints.sh @@ -19,13 +19,13 @@ mkdir -p checkpoints && cd checkpoints # Download the Tacotron2 and Waveglow checkpoints -if [ ! -f "checkpoints/tacotron2pyt_fp16_v3/tacotron2_1032590_6000_amp" ]; then - echo "Downloading Tacotron2 fp16 checkpoint from NGC" - ngc registry model download-version nvidia/tacotron2pyt_fp16:3 +if [ ! -f "checkpoints/tacotron2_pyt_ckpt_amp_v19.09.0/nvidia_tacotron2pyt_fp16_20190427" ]; then + echo "Downloading Tacotron2 checkpoint from NGC" + ngc registry model download-version nvidia/tacotron2_pyt_ckpt_amp:19.09.0 fi; -if [ ! -f "checkpoints/waveglow256pyt_fp16_v2/waveglow_1076430_14000_amp" ]; then - echo "Downloading Waveglow fp16 checkpoint from NGC" - ngc registry model download-version nvidia/waveglow256pyt_fp16:2 +if [ ! -f "checkpoints/waveglow_ckpt_amp_256_v19.10.0/nvidia_waveglow256pyt_fp16" ]; then + echo "Downloading Waveglow checkpoint from NGC" + ngc registry model download-version nvidia/waveglow_ckpt_amp_256:19.10.0 fi; cd - diff --git a/demo/Tacotron2/scripts/inference_benchmark.sh b/demo/Tacotron2/scripts/inference_benchmark.sh index 804334fc..620e2d25 100755 --- a/demo/Tacotron2/scripts/inference_benchmark.sh +++ b/demo/Tacotron2/scripts/inference_benchmark.sh @@ -18,4 +18,4 @@ echo "TensorRT BS=1, S=128" bash 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 echo "PyTorch (GPU) BS=1, S=128" -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 +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 diff --git a/demo/Tacotron2/scripts/install_prerequisites.sh b/demo/Tacotron2/scripts/install_prerequisites.sh index b12349f6..2ba498d9 100755 --- a/demo/Tacotron2/scripts/install_prerequisites.sh +++ b/demo/Tacotron2/scripts/install_prerequisites.sh @@ -17,7 +17,7 @@ pip3 install numba==0.48 torch==1.4.0 pip3 install -r requirements.txt -sudo apt-get install -y libsndfile1 +echo "nvidia" | sudo -S apt-get install -y libsndfile1 pushd /tmp git clone https://github.com/NVIDIA/apex diff --git a/demo/Tacotron2/test_infer.sh b/demo/Tacotron2/test_infer.sh index ff2cbf07..198c4742 100644 --- a/demo/Tacotron2/test_infer.sh +++ b/demo/Tacotron2/test_infer.sh @@ -18,8 +18,8 @@ BATCH_SIZE=1 INPUT_LENGTH=128 NUM_ITERS=1003 # extra 3 iterations for warmup -TACOTRON2_CKPT="tacotron2_1032590_6000_amp" -WAVEGLOW_CKPT="waveglow_1076430_14000_amp" +TACOTRON2_CKPT="nvidia_tacotron2pyt_fp16_20190427" +WAVEGLOW_CKPT="nvidia_waveglow256pyt_fp16" RUN_MODE="" # = fp32 LOG_RUN_MODE="gpu_fp32" TEST_PROGRAM="test_infer.py"