Add files via upload

This commit is contained in:
Anjok07 2023-10-17 21:10:50 -05:00 committed by GitHub
parent b281747deb
commit 6c0210aa77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)]
@ -768,7 +767,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