Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,17 +38,13 @@ diff_pipe = DiffusionPipeline.from_pretrained(
|
|
38 |
|
39 |
# 5. Dia TTS
|
40 |
with init_empty_weights():
|
41 |
-
dia = Dia.from_pretrained(
|
42 |
-
"nari-labs/Dia-1.6B",
|
43 |
-
trust_remote_code=True
|
44 |
-
)
|
45 |
dia = load_checkpoint_and_dispatch(
|
46 |
dia,
|
47 |
"nari-labs/Dia-1.6B",
|
48 |
-
device_map=
|
49 |
dtype=torch.float16
|
50 |
)
|
51 |
-
|
52 |
# Inference
|
53 |
def process_audio(audio):
|
54 |
sr, array = audio
|
|
|
38 |
|
39 |
# 5. Dia TTS
|
40 |
with init_empty_weights():
|
41 |
+
dia = Dia.from_pretrained("nari-labs/Dia-1.6B") # no extra kwargs
|
|
|
|
|
|
|
42 |
dia = load_checkpoint_and_dispatch(
|
43 |
dia,
|
44 |
"nari-labs/Dia-1.6B",
|
45 |
+
device_map="auto",
|
46 |
dtype=torch.float16
|
47 |
)
|
|
|
48 |
# Inference
|
49 |
def process_audio(audio):
|
50 |
sr, array = audio
|