From 40349bba46086f7eb39d00a1cf3e949762cde429 Mon Sep 17 00:00:00 2001 From: Anjok07 <68268275+Anjok07@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:19:15 -0500 Subject: [PATCH] Update separate.py --- separate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/separate.py b/separate.py index 33a51ed..abb3ac5 100644 --- a/separate.py +++ b/separate.py @@ -761,8 +761,9 @@ class SeperateMDXC(SeperateAttributes): 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)] - X = torch.zeros(S, *mix.shape).to(self.device) if S > 1 else torch.zeros_like(mix).to(self.device) - + X = torch.zeros(S, *mix.shape) if S > 1 else torch.zeros_like(mix) + X = X.to(self.device) + with torch.no_grad(): cnt = 0 for batch in batches: