This commit is contained in:
2026-07-09 10:26:27 -04:00
parent 79f9a1dbc2
commit da5206c6a6
9 changed files with 170 additions and 60 deletions
+18
View File
@@ -0,0 +1,18 @@
print('hello')
# %%
import open_clip
import torch
do_load = True
if do_load:
model_name = 'hf-hub:timm/ViT-L-16-SigLIP2-512'
# pretrained_name = 'webli'
model, preprocess = open_clip.create_model_from_pretrained('hf-hub:timm/ViT-L-16-SigLIP2-512')
# model, _, preprocess = open_clip.create_model_and_transforms(model_name, pretrained=pretrained_name)
device = 'cpu'
model.eval()
tokenizer = open_clip.get_tokenizer(model_name)