Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,19 +33,19 @@ Use this space to generate long-form speech up to around ~2 minutes in length. T
|
|
33 |
|
34 |
# Create pipelines, downloading required files as necessary
|
35 |
hybrid_task = Task.get("speech-synthesis", model="zonos-hybrid", available_only=False)
|
36 |
-
hybrid_task.download_required_files(text_callback=print)
|
37 |
hybrid_pipe = hybrid_task()
|
38 |
-
hybrid_pipe.load()
|
39 |
|
40 |
transformer_task = Task.get(
|
41 |
"speech-synthesis", model="zonos-transformer", available_only=False
|
42 |
)
|
43 |
-
transformer_task.download_required_files(text_callback=print)
|
44 |
transformer_pipe = transformer_task()
|
45 |
|
46 |
if is_hf_spaces:
|
47 |
# Must load all models on GPU when using ZERO
|
48 |
-
transformer_pipe.load()
|
49 |
|
50 |
# Global state
|
51 |
pipelines = {
|
|
|
33 |
|
34 |
# Create pipelines, downloading required files as necessary
|
35 |
hybrid_task = Task.get("speech-synthesis", model="zonos-hybrid", available_only=False)
|
36 |
+
hybrid_task.download_required_files(text_callback=print, allow_optional=True)
|
37 |
hybrid_pipe = hybrid_task()
|
38 |
+
hybrid_pipe.load(allow_optional=True)
|
39 |
|
40 |
transformer_task = Task.get(
|
41 |
"speech-synthesis", model="zonos-transformer", available_only=False
|
42 |
)
|
43 |
+
transformer_task.download_required_files(text_callback=print, allow_optional=True)
|
44 |
transformer_pipe = transformer_task()
|
45 |
|
46 |
if is_hf_spaces:
|
47 |
# Must load all models on GPU when using ZERO
|
48 |
+
transformer_pipe.load(allow_optional=True)
|
49 |
|
50 |
# Global state
|
51 |
pipelines = {
|