If you check the number of parameters via sum([p.nelement() for p in model1.parameters()]) you’ll see that a small difference is already visible as: 31036673 vs. 31037633, which points to a difference in the module initialization. Based on this small difference I would guess that a bias parameter is skipped in one model implementation and won’t explain the difference in memory usage.
To further narrow it down, check the shapes of all intermediate activation tensors (either in the forward methods directly or via forward hooks) and compare these.