It seems that somewhere in your code you are trying to push a module to the GPU.
Could you check for all model.cuda() and model.to('cuda') calls and remove them?
If you are using the to() approach, you could also write device-agnostic code by using:
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model.to(device)