Waveformer icon indicating copy to clipboard operation
Waveformer copied to clipboard

Lightning App demo

Open aniketmaurya opened this issue 3 years ago • 6 comments

Hi @vb000, I loved playing with Waveformer 💜 ! I have made a PR to enable audio input of any sample rate by converting it to the required rate 44100 in #1

In this PR, I have created a simple Lightning App for Waveformer.

Recently, we deployed a stable diffusion model with thousands of concurrency using Lightning Apps. If you're interested, we can do something similar for Waveformer as well 😄

aniketmaurya avatar Nov 10 '22 19:11 aniketmaurya

Thank you for this change as well @aniketmaurya! To understand more, which app.py version is used by the lightning app linked in the README? The version that Github server has, or our local clone? Also, what happens when we push a change to the app.py in this repo? Would the change automatically reflect on the app link on the README page?

vb000 avatar Nov 10 '22 21:11 vb000

Hi @vb000, the app.py version used by the Lightning App linked in the README is running from the latest code from this PR branch.

If we push a change to the app.py, we have to redeploy the app again. We can automate this using GitHub Actions, for example see this.

aniketmaurya avatar Nov 11 '22 06:11 aniketmaurya

btw I tried running the model on an MPS device, but it gave a noisy output after running it. Any idea why?

aniketmaurya avatar Nov 11 '22 07:11 aniketmaurya

@aniketmaurya, the app is fantastic! But to make sure this repository is simple and focused on the model development/evaluation, I feel it's best to separate out the application implementation. We did the same with the Huggingface Spaces deployment we provided as an example. Currently, this would require duplicating the model code, where the app is deployed. However, we plan to package this model as a pip package, which would avoid needing to duplicate the model code. We'd be happy to link your LightningApp in the readme if you're interested, though.

Regarding the MPS backend: I haven't worked with the MPS backend but if I have to guess, it's probably because the amplitude scale provided by that backend is incompatible with what the model expects. The model expects the amplitude to be normalized to the [-1, 1] range.

vb000 avatar Nov 12 '22 01:11 vb000

Thanks a lot of merging the last PR. We can keep the app code into our community project Awesome Lightning.

aniketmaurya avatar Nov 12 '22 20:11 aniketmaurya

Definitely, that sounds great!

vb000 avatar Nov 12 '22 23:11 vb000