If you want to use two models sequentially, you can just pass the output of one model to the other:
output1 = model1(x)
output2 = model2(output1)

As long as you don’t detach the tensors, the loss will be backpropagated to model1.