facebookresearch / audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
MIT License
20.59k stars 2.09k forks source link

MultiBandDiffusion should pass device to NoiseSchedule #209

Closed jn-jairo closed 1 year ago

jn-jairo commented 1 year ago

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

https://github.com/facebookresearch/audiocraft/blob/d6df4f0fff69a69299c5883fae4a4d6d7b8a7948/audiocraft/models/multibanddiffusion.py#L109

Missing device:

schedule = NoiseSchedule(**cfgs[i].schedule, sample_processor=processors[i], device=device)
robinsrm commented 1 year ago

Fixing it :) Thank you for pointing this !