agony
This commit is contained in:
parent
aefe8fcdad
commit
bfc5e1d723
|
@ -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.
|
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
|
## Requirements
|
||||||
|
|
||||||
Besides a working PyTorch environment, the only hard requirement is [`espeak-ng`](https://github.com/espeak-ng/espeak-ng/) for phonemizing text:
|
Besides a working PyTorch environment, the only hard requirement is [`espeak-ng`](https://github.com/espeak-ng/espeak-ng/) for phonemizing text:
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
argv = os.environ.get('VALLE_ARGS', None)
|
||||||
|
|
||||||
|
if argv:
|
||||||
|
sys.argv = sys.argv + argv.split(" ")
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import math
|
import math
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -29,7 +35,7 @@ try:
|
||||||
|
|
||||||
USING_SPACES = True
|
USING_SPACES = True
|
||||||
spaces_zerogpu_decorator = spaces.GPU
|
spaces_zerogpu_decorator = spaces.GPU
|
||||||
except ImportError:
|
except Exception as e:
|
||||||
USING_SPACES = False
|
USING_SPACES = False
|
||||||
def spaces_zerogpu_decorator(func):
|
def spaces_zerogpu_decorator(func):
|
||||||
return func
|
return func
|
||||||
|
@ -556,11 +562,11 @@ with ui:
|
||||||
def start( lock=True ):
|
def start( lock=True ):
|
||||||
setup_logging()
|
setup_logging()
|
||||||
|
|
||||||
ui.queue(max_size=8)
|
if not USING_SPACES:
|
||||||
ui.launch(share=args.share, server_name=args.listen_host, server_port=args.listen_port, prevent_thread_lock=not lock)
|
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__":
|
if __name__ == "__main__":
|
||||||
if not USING_SPACES:
|
start()
|
||||||
start()
|
|
||||||
else:
|
|
||||||
ui.queue().launch()
|
|
Loading…
Reference in New Issue
Block a user