I’m not sure if I understand the use case correctly, but if you want to use specific submodules from the pretrained models, you could use:
data = torch.randn(...)
out = model1.encoder(data)
out = model2.decoder(out)

assuming that model1 and model2 are written in a way to easily access the encoder and decoder submodules.