Ah, sorry I misunderstood the error message and thought you are already wrapping the model in nn.DataParallel before.
If you want device-agnostic code (that runs on CPU, GPU, multiple GPUs), I would recommend to store the state_dict without the .module attribute, which would be the cleanest approach.