Based on the error message, it seems like a known limitation, which apparently needs you to save and load the model via my_script_module.save(<filename>):

PickleError: ScriptModules cannot be deepcopied using copy.deepcopy or saved using torch.save. Mixed serialization of script and non-script modules is not supported. For purely script modules use my_script_module.save() instead.