Maybe you’re right. I think I just over-complicate things. My code was a bit like yours, first initializing and then loading the pretrained model. and then I just wondered if I can do it in a more efficient way. But it seems I go too much in the details. Thank you for your help.