Spaces:
Sleeping
Sleeping
Commit
·
6c005f0
1
Parent(s):
64a6fed
Fix gpu issues in remfx_detect script
Browse files- scripts/remfx_detect.py +2 -0
scripts/remfx_detect.py
CHANGED
@@ -48,9 +48,11 @@ def main(cfg: DictConfig):
|
|
48 |
audio = audio.mean(0, keepdim=True)
|
49 |
# Add dimension for batch
|
50 |
audio = audio.unsqueeze(0)
|
|
|
51 |
batch = [audio, audio, None, None]
|
52 |
|
53 |
_, y = inference_model(batch, 0, verbose=True)
|
|
|
54 |
if "output_path" in cfg:
|
55 |
output_path = cfg.output_path
|
56 |
else:
|
|
|
48 |
audio = audio.mean(0, keepdim=True)
|
49 |
# Add dimension for batch
|
50 |
audio = audio.unsqueeze(0)
|
51 |
+
audio = audio.to(device)
|
52 |
batch = [audio, audio, None, None]
|
53 |
|
54 |
_, y = inference_model(batch, 0, verbose=True)
|
55 |
+
y = y.cpu()
|
56 |
if "output_path" in cfg:
|
57 |
output_path = cfg.output_path
|
58 |
else:
|