region:us
# openclip模型加载代码
- 首先下载本仓库中的模型
- 按照下述代码加载openclip模型
```python
model_name = "ViT-B/32"
pretrained = False
model, _, _ = open_clip.create_model_and_transforms(model_name, pretrained=pretrained)

my_ckpt = torch.load("openclip_vit_b32.pt")
model.load_state_dict(my_ckpt)
```