You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the separate_tensor method on an instance of the Separator class of the api.py module, with a wav value of a Tensor with a dtype of float32 (as per the method docstring), apply.py raises an assertion error for padded_mix.dtype == th.float64, within the apply_model function. I assumed the padded_mix.dtype should have been the same as the dtype of the input audio, so altered the assertion to be padded_mix.dtype == th.float32. This seemed to then work without issue.
To Reproduce
Synthesize or import audio as Tensor with dtype=torch.float32
Initialize Separator class
Call separate_tensor method with created Tensor object
Expected behavior
separate_tensor would return expected vals.
Actual Behavior
AssertionError raised:
Traceback (most recent call last):
File "path", line 19, in
separator.separate_tensor(reshaped_tensor)
File "path", line 271, in separate_tensor
out = apply_model(
^^^^^^^^^^^^
File "path", line 218, in apply_model
res = apply_model(sub_model, mix, **kwargs, callback_arg=callback_arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 273, in apply_model
res = apply_model(model, shifted, **kwargs, callback_arg=callback_arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 323, in apply_model
chunk_out = future.result() # Get the result from the future.
^^^^^^^^^^^^^^^
File "path", line 131, in result
return self.func(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 365, in apply_model
assert padded_mix.dtype == th.float64
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your Environment
Python and PyTorch version:
py 3.11.4 64-bit
torch 2.0.1
Operating system and version (desktop or mobile):
Windows 11
Hardware (gpu or cpu, amount of RAM etc.):
cpu: AMD Ryzen 5
gpu: NVIDIA GeForce GTX 1650 SUPER
RAM: 32 GB
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
When calling the
separate_tensor
method on an instance of theSeparator
class of the api.py module, with a wav value of a Tensor with adtype
offloat32
(as per the method docstring), apply.py raises an assertion error forpadded_mix.dtype == th.float64
, within theapply_model
function. I assumed thepadded_mix.dtype
should have been the same as thedtype
of the input audio, so altered the assertion to bepadded_mix.dtype == th.float32
. This seemed to then work without issue.To Reproduce
Tensor
withdtype=torch.float32
Separator
classseparate_tensor
method with createdTensor
objectExpected behavior
separate_tensor
would return expected vals.Actual Behavior
AssertionError
raised:Traceback (most recent call last):
File "path", line 19, in
separator.separate_tensor(reshaped_tensor)
File "path", line 271, in separate_tensor
out = apply_model(
^^^^^^^^^^^^
File "path", line 218, in apply_model
res = apply_model(sub_model, mix, **kwargs, callback_arg=callback_arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 273, in apply_model
res = apply_model(model, shifted, **kwargs, callback_arg=callback_arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 323, in apply_model
chunk_out = future.result() # Get the result from the future.
^^^^^^^^^^^^^^^
File "path", line 131, in result
return self.func(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path", line 365, in apply_model
assert padded_mix.dtype == th.float64
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your Environment
The text was updated successfully, but these errors were encountered: