Why model.to(device) wouldn't put tensors on a custom layer to the same device?

Sorry if new to this, how does register_buffer handle the .to(device) problem here, such that the custom module goes on the same device as the model it is part of. Thank you so much!