hmmm in theory when you register a tensor inside a nn.Module it does internally calls register_buffer.
if you use a debugger (for example in pycharm, spyder or ipdb) to stop the execution in the exception. You will be able to see which tensor is at cpu.
BTW are you sure it’s not about the input tensors?
That error can be thrown whether because the model is allocated at cuda but the input is not or the other way around.
Without seeing the code it’s difficult to provide more clue.
The only exception in which calling model.cuda() would map tensors to gpu is if any parameter isn’t properly registered as a nn.parameter/buffer.
This happens, for example, if you create an ordinary list/tuple/dictionary of tensors/layers. The recursive allocator only explores nn.Modules.
That is why pytorch provide their own list-like object and dict-like object.