Closed yocontra closed 6 months ago
I'm not sure about this issue. Can't reproduce.
@CarlGao4 Did you test it with the model loaded onto a GPU w/ cuda?
abs_filename = "./some.mp3"
model = Separator(model="htdemucs", device="cuda")
_wav, stems = model.separate_audio_file(abs_filename)
Yes
Actually, I disagree with this PR as storing the whole audio in VRAM will probably cause OOM. And you can see in the code:
https://github.com/adefossez/demucs/blob/main/demucs/apply.py#L312
Each chunk will be moved to the target device before separating so model and audio will be on the same device at this time.
I quite can't understand why you are encountering this issue. Please provide your error message and maybe you can try reinstalling this module from this repo?
Hmm not sure, I'll keep debugging but agree this PR isn't the correct solution since it seems this is already being handled.
Previously
Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
if you had the model on cuda, this should move the tensor to the right place.