From b20ab2508066b0372631a1b3b5d6b0e04b45d7eb Mon Sep 17 00:00:00 2001 From: Anjok07 <68268275+Anjok07@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:32:35 -0500 Subject: [PATCH] Update separate.py --- separate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/separate.py b/separate.py index 8e8733c..864473e 100644 --- a/separate.py +++ b/separate.py @@ -757,7 +757,6 @@ class SeperateMDXC(SeperateAttributes): mix_shape = mix.shape[1] pad_size = hop_size - (mix_shape - chunk_size) % hop_size mix = torch.cat([torch.zeros(2, chunk_size - hop_size), mix, torch.zeros(2, pad_size + chunk_size - hop_size)], 1) - mix = mix.to(self.device) chunks = mix.unfold(1, chunk_size, hop_size).transpose(0, 1) batches = [chunks[i : i + batch_size] for i in range(0, len(chunks), batch_size)] @@ -769,7 +768,7 @@ class SeperateMDXC(SeperateAttributes): cnt = 0 for batch in batches: self.running_inference_progress_bar(len(batches)) - x = model(batch) + x = model(batch.to(self.device)) for w in x: X[..., cnt * hop_size : cnt * hop_size + chunk_size] += w