Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nvidia Waveglow/Tacotron2 example #1905

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Conversation

kbumsik
Copy link
Contributor

@kbumsik kbumsik commented Oct 13, 2022

Description

After two years of the last update (#762) Nvidia seems to update the Tactron2 infer() interface, which breaks the example handler. This PR fixes this.

Also cleanup unused and deprecated script (create_mar.py)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Feature/Issue validation/testing

Run the TTS example by following the README.md.

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@msaroufim
Copy link
Member

Thank you! Do you mind just uploading some logs showing the model working locally for you.

@kbumsik
Copy link
Contributor Author

kbumsik commented Oct 13, 2022

No problem. Here is the steps I did:

pip install numpy scipy unidecode inflect
pip install librosa --user
./create_mar.sh

...output of commands...

mkdir model_store
mv waveglow_synthesizer.mar model_store/
torchserve --start --model-store model_store --models waveglow_synthesizer.mar

# inference
curl http://127.0.0.1:8080/predictions/waveglow_synthesizer -T sample_text.txt -o audio.wav

# logs
2022-10-14 02:49:12,586 [INFO ] W-9007-waveglow_synthesizer_1.0-stdout MODEL_METRICS - HandlerTime.Milliseconds:1738.03|#ModelName:waveglow_synthesizer,Level:Model|#hostname:fury,requestID:ad2b5e1c-f808-414f-9f77-91da6d99a264,timestamp:1665683352
2022-10-14 02:49:12,587 [INFO ] W-9007-waveglow_synthesizer_1.0-stdout MODEL_METRICS - PredictionTime.Milliseconds:1738.2|#ModelName:waveglow_synthesizer,Level:Model|#hostname:fury,requestID:ad2b5e1c-f808-414f-9f77-91da6d99a264,timestamp:1665683352
2022-10-14 02:49:12,588 [INFO ] W-9007-waveglow_synthesizer_1.0 org.pytorch.serve.wlm.WorkerThread - Backend response time: 1742
2022-10-14 02:49:12,591 [INFO ] W-9007-waveglow_synthesizer_1.0 ACCESS_LOG - /127.0.0.1:60502 "PUT /predictions/waveglow_synthesizer HTTP/1.1" 200 37309

And here is the output audio.wav file:
audio.wav.zip

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #1905 (26eaf31) into master (c3ec201) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1905   +/-   ##
=======================================
  Coverage   44.95%   44.95%           
=======================================
  Files          63       63           
  Lines        2609     2609           
  Branches       56       56           
=======================================
  Hits         1173     1173           
  Misses       1436     1436           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@msaroufim
Copy link
Member

Can you please fix the lint by running pre-commit otherwise LGTM

Remove create_mar.py as there has been updated create_mar.sh file.
There are two updates in Nvidia Tacotron2 interface:
1. infer() receives input_lengths argument
2. infer() returns mel, mel_lengths, alightments
@kbumsik
Copy link
Contributor Author

kbumsik commented Oct 13, 2022

I run pre-commit. A lot of lines were changed btw.

@kbumsik kbumsik requested review from msaroufim and removed request for namannandan and agunapal October 13, 2022 23:59
@kbumsik
Copy link
Contributor Author

kbumsik commented Oct 18, 2022

Looks like the failing CI has nothing to do with the current change though. Please tell me if there is anything I need to do :)

@msaroufim
Copy link
Member

Yup windows is flaky don't worry about it

@maaquib maaquib merged commit 877c7b6 into pytorch:master Oct 19, 2022
jagadeeshi2i pushed a commit to jagadeeshi2i/serve that referenced this pull request Nov 1, 2022
* example.tts: Remove old create_mar.py

Remove create_mar.py as there has been updated create_mar.sh file.

* example.tts: Update tacotron2 inference interface

There are two updates in Nvidia Tacotron2 interface:
1. infer() receives input_lengths argument
2. infer() returns mel, mel_lengths, alightments

Co-authored-by: Aaqib <maaquib@gmail.com>
jagadeeshi2i pushed a commit to jagadeeshi2i/serve that referenced this pull request Nov 3, 2022
* example.tts: Remove old create_mar.py

Remove create_mar.py as there has been updated create_mar.sh file.

* example.tts: Update tacotron2 inference interface

There are two updates in Nvidia Tacotron2 interface:
1. infer() receives input_lengths argument
2. infer() returns mel, mel_lengths, alightments

Co-authored-by: Aaqib <maaquib@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants