neonbjb / tortoise-tts

A multi-voice TTS system trained with an emphasis on quality
Apache License 2.0
13.08k stars 1.81k forks source link

add web demo to Huggingface #2

Closed AK391 closed 2 years ago

AK391 commented 2 years ago

Hi, would you be interested in adding tortoise-tts web demo to Hugging Face using Gradio? I see there is already models setup on Huggingface for this repo https://huggingface.co/jbetker

here is a guide for adding spaces to your org or username

How to add a Space: https://huggingface.co/blog/gradio-spaces

Example spaces with repos: github: https://github.com/salesforce/BLIP Spaces: https://huggingface.co/spaces/salesforce/BLIP

github: https://github.com/facebookresearch/omnivore Spaces: https://huggingface.co/spaces/akhaliq/omnivore

a Gradio Demo can be setup in 2 lines of code using the inference api (if enabled) integration through huggingface

import gradio as gr
gr.Interface.load("huggingface/jbetker/tortoise-tts-v2").launch()

would launch the demo

Please let us know if you would be interested and if you have any questions.

neonbjb commented 2 years ago

I'd love to do this, but this model will not run on CPUs (inference will take hours or more). I read that GPU runtimes are for organizations only. Let me know if this understanding is wrong..

AK391 commented 2 years ago

@neonbjb great, from the spaces docs https://huggingface.co/docs/hub/spaces

"Each Spaces environment is limited to 16GB RAM and 8 CPU cores. Organization subscribers (Lab, Startup, and Enterprise) can access Spaces with one T4 GPU on a case-by-case basis. Please email us at website at huggingface.co or let us know on Twitter if you need one."

GPU's can be assigned to individual accounts as well if requested

I can also send a request for GPU for a space once its setup

neonbjb commented 2 years ago

Awesome, I'd be glad to do this then! Expect something in the next day or two..

osanseviero commented 2 years ago

Hey there, if it's ok I would love to work on this. I'm actually half-way done through it :rocket: Working on https://huggingface.co/spaces/osanseviero/tortoisse-tts and happy to transfer once done.

neonbjb commented 2 years ago

Sure, have at it. I'll await your pr.

osanseviero commented 2 years ago

You can find a working demo in https://huggingface.co/spaces/osanseviero/tortoisse-tts :fire:

neonbjb commented 2 years ago

Hmm looks like it is running out of RAM? Did you get it to work without this error?

Tortoise shouldn't need more than 16GB of RAM, but this may be a result of doing the computations in on CPU. I'll have to profile it to be sure.

osanseviero commented 2 years ago

I restarted it and it's up again, but I haven't looked at why we got a out of RAM issue before.

neonbjb commented 2 years ago

Space created: https://huggingface.co/spaces/jbetker/tortoise; I'll contact website@ to see if I can get a GPU instance dedicated to it.

neonbjb commented 2 years ago

Closing this out.