NVIDIA / waveglow

A Flow-based Generative Network for Speech Synthesis
BSD 3-Clause "New" or "Revised" License
2.29k stars 530 forks source link

jupyter notebook in Google Colab #4

Open yhgon opened 6 years ago

yhgon commented 6 years ago

I made jupyter notebook for WaveGlow Model in Google COLAB. Within 10 minutes including time to get weight file(2GB) , you could synthesize voice. https://github.com/yhgon/waveglow/blob/master/inference_COLAB.ipynb

AlexanderKozhevin commented 6 years ago

@yhgon Can you provide a link to colab notebook? Because if I will save this file and run it on my google account I'll get an error .

ls: cannot access 'drive/My Drive/COLAB_data': No such file or directory
AlexanderKozhevin commented 6 years ago

Here is a short version of CoLab notebook. https://colab.research.google.com/drive/1Uq82vMikrg3FhiyH4WyooqJvl20i8XMt

postacik commented 6 years ago

https://colab.research.google.com/drive/1Uq82vMikrg3FhiyH4WyooqJvl20i8XMt

This notebook works only with the first commit of the project.

I could not run it with the latest commit which requires torch==1.0.0a0.

Could anyone succeed to create a working notebook with the latest commit?

rishikksh20 commented 6 years ago

@postacik @AlexanderKozhevin @yhgon Anyone have Nvidia's tacotron2 pretrained model for LJSpeech ?

yhgon commented 6 years ago

@postacik T2+WaveGlow works well in last commit with pytorch 1.0.0a0

at this moment, pytorch don't support 1.0.0a0 version pip binary installation in COLAB.

pip install torch=1.0.0a0

Collecting torch==1.0.0a0
  Could not find a version that satisfies the requirement torch==1.0.0a0 (from versions: 0.1.2, 0.1.2.post1, 0.3.1, 0.4.0, 0.4.1)
No matching distribution found for torch==1.0.0a0

So you need to install pytorch 1.0.0a0 manually

I just share one draft jupyter on V100 using hryu/pytorch:t2-ngc-18.11

docker pull hryu/pytorch:t2-ngc-18.11
nvidia-docker run -p8888:8888 hryu/pytorch:t2-ngc-18.11
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root  --NotebookApp.token=''

you need 200K T2 checkpoint for high quality wav but I just show 28K iter T2 checkpoint + WG original checkpoint. noisy but useful to check demo.

I'll update soon FP16 inference in both of Tesla T4 and V100.

postacik commented 6 years ago

@yhgon, thank you very much.

I was looking for a way to generate mel from plain text, your sample clearly explains how to do it.

xingjy10 commented 6 years ago

sorry, i can not open the page https://github.com/yhgon/waveglow/blob/master/inference_COLAB.ipynb

will you upload your inference code of tacotron2 and waveglow

yhgon commented 6 years ago

NVIDIA provide new inference jupyter and public Tacotron2 and Waveglow checkpoint Link.

yhgon commented 6 years ago

New Jupyters :

inference speed( there are a lot of room to optimize)

                       FP32(I/O)          FP32       FP16
Tesla V100(Volta)             0.3s            0.28s         0.18s
Tesla T4 (Turing)              0.8s            0.67s         0.53s 
Tesla P100 (Pascal)         8.37s               -*                -*     (*not measured)
Tesla K80   (Kepler)          17s              6sec            N/A**      (** not available)

Use Pytorch 1.0 with NGC 18.09+. You could duplicate with my custom build docker image hryu/pytorch:t2-ngc-18.11 based on NGC 18.11.

you could reproduce it on any system with below command :

docker pull hryu/pytorch:t2-ngc-18.11 
docker run –runtime=nvidia  -ti –v/shared:/shared   –p8888:8888  hryu/pytorch:t2-ngc-18.11 bash
nvidia-smi 
cd /shared && jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root  --NotebookApp.token='' --notebookDir=/shared
rgzn-aiyun commented 5 years ago

@yhgon Error when running to load wave weight parameters?

TypeError Traceback (most recent call last)

in TypeError: remove_weightnorm() missing 1 required positional argument: 'model'
hadaev8 commented 5 years ago

@yhgon did you make cuda 10 on colab? Im stucked with it.

cduguet commented 5 years ago

@yhgon Could you please share your Dockerfiles? I'd love to have it for hryu/pytorch:ngc19.05-t2-try1