Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,8 @@ from share_btn import community_icon_html, loading_icon_html, share_js
|
|
8 |
|
9 |
os.environ["TOKENIZERS_PARALLELISM"] = "true"
|
10 |
|
11 |
-
model_id = "haoheliu/audioldm2-full"
|
12 |
-
hf_hub_download(repo_id="haoheliu/audioldm2-full", filename="audioldm2-full.pth")
|
13 |
|
|
|
14 |
audioldm = None
|
15 |
current_model_name = None
|
16 |
|
@@ -19,7 +18,7 @@ def text2audio(
|
|
19 |
guidance_scale,
|
20 |
random_seed,
|
21 |
n_candidates,
|
22 |
-
model_name=
|
23 |
):
|
24 |
global audioldm, current_model_name
|
25 |
torch.set_float32_matmul_precision("high")
|
@@ -298,35 +297,35 @@ with iface:
|
|
298 |
3.5,
|
299 |
45,
|
300 |
3,
|
301 |
-
|
302 |
],
|
303 |
[
|
304 |
"A cat is meowing for attention.",
|
305 |
3.5,
|
306 |
45,
|
307 |
3,
|
308 |
-
|
309 |
],
|
310 |
[
|
311 |
"Birds singing sweetly in a blooming garden.",
|
312 |
3.5,
|
313 |
45,
|
314 |
3,
|
315 |
-
|
316 |
],
|
317 |
[
|
318 |
"A modern synthesizer creating futuristic soundscapes.",
|
319 |
3.5,
|
320 |
45,
|
321 |
3,
|
322 |
-
|
323 |
],
|
324 |
[
|
325 |
"The vibrant beat of Brazilian samba drums.",
|
326 |
3.5,
|
327 |
45,
|
328 |
3,
|
329 |
-
|
330 |
],
|
331 |
],
|
332 |
fn=text2audio,
|
|
|
8 |
|
9 |
os.environ["TOKENIZERS_PARALLELISM"] = "true"
|
10 |
|
|
|
|
|
11 |
|
12 |
+
default_checkpoint="audioldm2-full-large-650k"
|
13 |
audioldm = None
|
14 |
current_model_name = None
|
15 |
|
|
|
18 |
guidance_scale,
|
19 |
random_seed,
|
20 |
n_candidates,
|
21 |
+
model_name=default_checkpoint,
|
22 |
):
|
23 |
global audioldm, current_model_name
|
24 |
torch.set_float32_matmul_precision("high")
|
|
|
297 |
3.5,
|
298 |
45,
|
299 |
3,
|
300 |
+
default_checkpoint,
|
301 |
],
|
302 |
[
|
303 |
"A cat is meowing for attention.",
|
304 |
3.5,
|
305 |
45,
|
306 |
3,
|
307 |
+
default_checkpoint,
|
308 |
],
|
309 |
[
|
310 |
"Birds singing sweetly in a blooming garden.",
|
311 |
3.5,
|
312 |
45,
|
313 |
3,
|
314 |
+
default_checkpoint,
|
315 |
],
|
316 |
[
|
317 |
"A modern synthesizer creating futuristic soundscapes.",
|
318 |
3.5,
|
319 |
45,
|
320 |
3,
|
321 |
+
default_checkpoint,
|
322 |
],
|
323 |
[
|
324 |
"The vibrant beat of Brazilian samba drums.",
|
325 |
3.5,
|
326 |
45,
|
327 |
3,
|
328 |
+
default_checkpoint,
|
329 |
],
|
330 |
],
|
331 |
fn=text2audio,
|