I used random input for latent and had the same error.
I did clone the generator (Stylegan2) again, and it is working.
I think I had changed somewhere of the source code to adapt it for my input and it was producing the error.
However is there any source to read more about type IDs?