You could you try to check all modules at once with:
all([m0.__class__ == m1.__class__ for m0, m1 in zip(modelA.modules(), modelB.modules())])

If it returns False, you can remove the all op and see at which position it returned False.
Then try to find out, why these layers differ.