How can i complete the task with .pth files?

Yes, the model loading should be generic across models.
I think extracting model features has been thoroughly discussed in the past; example thread:
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model