File size: 535 Bytes
0902316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## 🚀 How to use SafeR-CLIP

SafeR-CLIP is a drop-in replacement for standard CLIP models.
You can load it using the HuggingFace transformers library.

### Installation
pip install torch torchvision transformers

### Load SafeR-CLIP
import torch
from transformers import CLIPModel, CLIPProcessor

model_id = "Adeely93/SafeR_CLIP"

processor = CLIPProcessor.from_pretrained(model_id)
model = CLIPModel.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="auto"
)

model.eval()


---
license: cc-by-nc-4.0
---