Usually you would register M in K, if it’s a submodule of K.
Your workflow should work, but you would have to make sure that both models are on the same device etc.
Registering M as a submodule would e.g. push it to the same device as K by using kk.to(device).