This commit is contained in:
mrq 2024-11-05 22:30:49 -06:00
parent aefe8fcdad
commit bfc5e1d723
2 changed files with 16 additions and 8 deletions

View File

@ -6,6 +6,8 @@
An unofficial PyTorch implementation of [VALL-E](https://vall-e-demo.ecker.tech/), utilizing the [EnCodec](https://github.com/facebookresearch/encodec) encoder/decoder.
A demo is available on HuggingFace [here](https://huggingface.co/spaces/ecker/vall-e).
## Requirements
Besides a working PyTorch environment, the only hard requirement is [`espeak-ng`](https://github.com/espeak-ng/espeak-ng/) for phonemizing text:

View File

@ -1,5 +1,11 @@
import os
import sys
import os
argv = os.environ.get('VALLE_ARGS', None)
if argv:
sys.argv = sys.argv + argv.split(" ")
import re
import math
import argparse
@ -29,7 +35,7 @@ try:
USING_SPACES = True
spaces_zerogpu_decorator = spaces.GPU
except ImportError:
except Exception as e:
USING_SPACES = False
def spaces_zerogpu_decorator(func):
return func
@ -556,11 +562,11 @@ with ui:
def start( lock=True ):
setup_logging()
ui.queue(max_size=8)
ui.launch(share=args.share, server_name=args.listen_host, server_port=args.listen_port, prevent_thread_lock=not lock)
if __name__ == "__main__":
if not USING_SPACES:
start()
ui.queue(max_size=8)
ui.launch(share=args.share, server_name=args.listen_host, server_port=args.listen_port, prevent_thread_lock=not lock)
else:
ui.queue().launch()
if __name__ == "__main__":
start()