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

Lightning App demo #2

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

aniketmaurya
Copy link
Contributor

@aniketmaurya aniketmaurya commented Nov 10, 2022

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 😄

@vb000
Copy link
Owner

vb000 commented Nov 10, 2022

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?

@aniketmaurya
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@vb000
Copy link
Owner

vb000 commented Nov 12, 2022

@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.

@aniketmaurya
Copy link
Contributor Author

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

@vb000
Copy link
Owner

vb000 commented Nov 12, 2022

Definitely, that sounds great!

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.

2 participants