The easy but potentially dangerous method would be to use load_state_dict(state_dict, strict=False) and let PyTorch only load the matching modules. The save approach would be to manipulate the stored state_dict keys to match the new naming and load explicitly the desired data via e.g. modelB.stack.load_state_dict().