VOIDER commited on
Commit
ba71a2e
·
verified ·
1 Parent(s): 3a8def8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,8 +68,8 @@ def normalized(a: torch.Tensor, order=2, dim=-1):
68
  return a / l2
69
 
70
  def load_clip_models(name: str = "ViT-L/14", device='cuda'):
71
- import clip
72
- model2, preprocess = clip.load(name, device=device)
73
  return model2, preprocess
74
 
75
  def load_model(model_path: str, input_size=768, device: str = 'cuda', dtype=None):
 
68
  return a / l2
69
 
70
  def load_clip_models(name: str = "ViT-L/14", device='cuda'):
71
+ import open_clip
72
+ model2, preprocess = open_clip.create_model_and_transforms(name, device=device)
73
  return model2, preprocess
74
 
75
  def load_model(model_path: str, input_size=768, device: str = 'cuda', dtype=None):