multimodalart HF staff commited on
Commit
e93e44b
1 Parent(s): 568d1c7

Load the small model correctly

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -60,8 +60,9 @@ model = model.half().cuda().eval().requires_grad_(False)
60
 
61
  model_small = get_model('cc12m_1')()
62
  model_small.load_state_dict(torch.load(cc12m_model, map_location='cpu'))
63
- model_small = model.half().cuda().eval().requires_grad_(False)
64
 
 
65
  clip_model = clip.load(model.clip_model, jit=False, device='cuda')[0]
66
  clip_model.eval().requires_grad_(False)
67
  normalize = transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],
 
60
 
61
  model_small = get_model('cc12m_1')()
62
  model_small.load_state_dict(torch.load(cc12m_model, map_location='cpu'))
63
+ model_small = model_small.half().cuda().eval().requires_grad_(False)
64
 
65
+ print(model.clip_model)
66
  clip_model = clip.load(model.clip_model, jit=False, device='cuda')[0]
67
  clip_model.eval().requires_grad_(False)
68
  normalize = transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],