xvdp:

but Ive had several times to load a pth, wipe it clean and save it again, or save its parts, or…


I haven’t seen these issues yet, so could you point me to some examples?
If I’m understanding it correctly, it seems the writing/saving process was somehow interrupted, which resulted in an invalid file?



 xvdp:

Im here because of the same “error”.


Storing the state_dict is backward compatible and thus the recommended way.
If you store the model completely, you might need to use dump_patches=True to fix the code.