Hugo Flores Garcia commited on
Commit
f572dd0
·
1 Parent(s): 021d911
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -16,13 +16,7 @@ import gradio as gr
16
  from vampnet.interface import Interface, signal_concat
17
  from vampnet import mask as pmask
18
 
19
- if torch.cuda.is_available():
20
- device = "cuda"
21
- elif torch.backends.mps.is_available():
22
- device = "mps"
23
- else:
24
- device = "cpu"
25
-
26
  print(f"using device {device}\n"*10)
27
 
28
  interface = Interface.default()
@@ -137,6 +131,13 @@ def _vamp_internal(
137
  typical_mass, typical_min_tokens, top_p,
138
  sample_cutoff, stretch_factor, sampling_steps, beat_mask_ms, num_feedback_steps, api=False, harp=False
139
  ):
 
 
 
 
 
 
 
140
 
141
  print("args!")
142
  print(f"seed: {seed}")
 
16
  from vampnet.interface import Interface, signal_concat
17
  from vampnet import mask as pmask
18
 
19
+ device="cpu"
 
 
 
 
 
 
20
  print(f"using device {device}\n"*10)
21
 
22
  interface = Interface.default()
 
131
  typical_mass, typical_min_tokens, top_p,
132
  sample_cutoff, stretch_factor, sampling_steps, beat_mask_ms, num_feedback_steps, api=False, harp=False
133
  ):
134
+ if torch.cuda.is_available():
135
+ device = "cuda"
136
+ elif torch.backends.mps.is_available():
137
+ device = "mps"
138
+ else:
139
+ device = "cpu"
140
+
141
 
142
  print("args!")
143
  print(f"seed: {seed}")