Is the only difference between your and my code the model definition now?
If so, could you post it here, so that we could have a look?
While the modules might be equal (shown by print(model)), the forward call might still be different and raise this issue.