Update demos/musicgen_app.py
Browse files- demos/musicgen_app.py +2 -2
demos/musicgen_app.py
CHANGED
@@ -142,9 +142,9 @@ def load_model(version="facebook/musicgen-small"):
|
|
142 |
torch.cuda.empty_cache()
|
143 |
MODEL = None # in case loading would crash
|
144 |
# MODEL = MusicGen.get_pretrained("/Users/ebenge/repos/audiocraft/data/")
|
145 |
-
lm = load_lm_model("data/state_dict.bin", device="
|
146 |
compression_model = load_compression_model(
|
147 |
-
"facebook/encodec_32khz", device="
|
148 |
)
|
149 |
MODEL = MusicGen("musiversal/musicgen-small", compression_model, lm)
|
150 |
print("Custom model loaded.")
|
|
|
142 |
torch.cuda.empty_cache()
|
143 |
MODEL = None # in case loading would crash
|
144 |
# MODEL = MusicGen.get_pretrained("/Users/ebenge/repos/audiocraft/data/")
|
145 |
+
lm = load_lm_model("data/state_dict.bin", device="cpu")
|
146 |
compression_model = load_compression_model(
|
147 |
+
"facebook/encodec_32khz", device="cpu"
|
148 |
)
|
149 |
MODEL = MusicGen("musiversal/musicgen-small", compression_model, lm)
|
150 |
print("Custom model loaded.")
|