There isn’t such a thing as pure PyTorch. All custom modules have definition. And loading .pt file requires those definition to be present. This is true for any model, not just the ones in Ultralytics and it is simply how .pt (or pickle to be precise) files work. You can’t decouple them from the module definitions. Best you can do is use a format like TorchScript.