diff --git a/deepmd/pt/model/descriptor/hybrid.py b/deepmd/pt/model/descriptor/hybrid.py index 8b8037c87b..5f1e3fb067 100644 --- a/deepmd/pt/model/descriptor/hybrid.py +++ b/deepmd/pt/model/descriptor/hybrid.py @@ -149,10 +149,12 @@ def forward( The smooth switch function. this descriptor returns None """ out_descriptor = [] - for descrpt, nci in zip(self.descrpt_list, self.nlist_cut_idx): + # make jit happy + # for descrpt, nci in zip(self.descrpt_list, self.nlist_cut_idx): + for ii, descrpt in enumerate(self.descrpt_list): # cut the nlist to the correct length odescriptor, _, _, _, _ = descrpt( - coord_ext, atype_ext, nlist[:, :, nci], mapping + coord_ext, atype_ext, nlist[:, :, self.nlist_cut_idx[ii]], mapping ) out_descriptor.append(odescriptor) out_descriptor = torch.cat(out_descriptor, dim=-1)