Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
·
9e299c8
1
Parent(s):
a0d4013
update
Browse files- app.py +6 -1
- requirements.txt +3 -2
app.py
CHANGED
@@ -17,7 +17,12 @@ from inversion_utils import inversion_forward_process, inversion_reverse_process
|
|
17 |
LDM2 = "cvssp/audioldm2"
|
18 |
MUSIC = "cvssp/audioldm2-music"
|
19 |
LDM2_LARGE = "cvssp/audioldm2-large"
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
21 |
ldm2 = load_model(model_id=LDM2, device=device)
|
22 |
ldm2_large = load_model(model_id=LDM2_LARGE, device=device)
|
23 |
ldm2_music = load_model(model_id=MUSIC, device=device)
|
|
|
17 |
LDM2 = "cvssp/audioldm2"
|
18 |
MUSIC = "cvssp/audioldm2-music"
|
19 |
LDM2_LARGE = "cvssp/audioldm2-large"
|
20 |
+
if torch.cuda.is_available():
|
21 |
+
device = "cuda"
|
22 |
+
elif torch.backends.mps.is_available():
|
23 |
+
device = "mps"
|
24 |
+
else:
|
25 |
+
device = "cpu"
|
26 |
ldm2 = load_model(model_id=LDM2, device=device)
|
27 |
ldm2_large = load_model(model_id=LDM2_LARGE, device=device)
|
28 |
ldm2_music = load_model(model_id=MUSIC, device=device)
|
requirements.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
-
|
2 |
-
|
|
|
3 |
diffusers
|
4 |
accelerate
|
5 |
transformers
|
|
|
1 |
+
gradio
|
2 |
+
#torch
|
3 |
+
#torchaudio
|
4 |
diffusers
|
5 |
accelerate
|
6 |
transformers
|