soujanyaporia
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -225,19 +225,22 @@ class Mustango:
|
|
225 |
|
226 |
|
227 |
# Initialize Mustango
|
228 |
-
mustango = Mustango(device="cpu")
|
229 |
-
mustango.vae.to(device_type)
|
230 |
-
mustango.stft.to(device_type)
|
231 |
-
mustango.model.to(device_type)
|
232 |
-
mustango.music_model.beats_model.to(device_type)
|
233 |
-
mustango.music_model.chords_model.to(device_type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
|
235 |
mustango.model.device = device_selection
|
236 |
|
237 |
-
# if torch.cuda.is_available():
|
238 |
-
# mustango = Mustango()
|
239 |
-
# else:
|
240 |
-
# mustango = Mustango(device="cpu")
|
241 |
|
242 |
# output_wave = mustango.generate("This techno song features a synth lead playing the main melody.", 5, 3, disable_progress=False)
|
243 |
@spaces.GPU(duration=120)
|
|
|
225 |
|
226 |
|
227 |
# Initialize Mustango
|
228 |
+
# mustango = Mustango(device="cpu")
|
229 |
+
# mustango.vae.to(device_type)
|
230 |
+
# mustango.stft.to(device_type)
|
231 |
+
# mustango.model.to(device_type)
|
232 |
+
# mustango.music_model.beats_model.to(device_type)
|
233 |
+
# mustango.music_model.chords_model.to(device_type)
|
234 |
+
|
235 |
+
# if torch.cuda.is_available():
|
236 |
+
# mustango = Mustango(device=device_selection)
|
237 |
+
# else:
|
238 |
+
# mustango = Mustango(device="CPU")
|
239 |
+
|
240 |
+
mustango = Mustango(device=device_selection)
|
241 |
|
242 |
mustango.model.device = device_selection
|
243 |
|
|
|
|
|
|
|
|
|
244 |
|
245 |
# output_wave = mustango.generate("This techno song features a synth lead playing the main melody.", 5, 3, disable_progress=False)
|
246 |
@spaces.GPU(duration=120)
|