CLIP_Surgery icon indicating copy to clipboard operation
CLIP_Surgery copied to clipboard

custom pretrained weights

Open Tinaliu123 opened this issue 1 year ago • 1 comments

Can I load my custom pretrained weights by providing the path to the weights when I load the mode?

Tinaliu123 avatar Apr 06 '24 07:04 Tinaliu123

I just so happened to implement that yesterday in my fork, for the same reasons (using my fine-tune with it). You can replace (temporarily rename) the original pre-trained CLIP model in .cache/clip and put your fine-tune of the same model in place of it (though you could also modify the code to use torch.load and just load the pickle / .pt from somewhere else instead):

https://github.com/zer0int/CLIP_Surgery

zer0int avatar Apr 10 '24 12:04 zer0int