Can I call prepare() separately on multiple models or should it be a single call?
Is there any documentation on how to use prepare in various cases? I have two models but want to use the same optimizer. How should I use theprepare()in such a case?I’m training the two models in tandem, saymodel1andmodel2. When calling theprepare()function, can I call it separately as in the below code?model1, dataloader, optimizer = accelerator.prepare(model1, dataloader, optimizer)
if some_condition:
    model2 = acceletator.prepare(model2)Or do I have to callprepare()only once, as in the below code?if not some_condition:
    model1, dataloader, optimizer = accelerator.prepare(model1, dataloader, optimizer)
else:
    model1, model2, dataloader, optimizer = acceletator.prepare(model1, model2, dataloader, optimizer)I’ve asked this onstackoverflowas well