VOIDER commited on
Commit
6220cc5
·
verified ·
1 Parent(s): 983aac3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -73,7 +73,7 @@ def load_clip_models(name: str = "ViT-L/14", device='cuda'):
73
 
74
  def load_model(model_path: str, input_size=768, device: str = 'cuda', dtype=None):
75
  model = MLP(input_size=input_size)
76
- state = torch.load(model_path, map_location=device)
77
  model.load_state_dict(state)
78
  model.to(device)
79
  if dtype:
 
73
 
74
  def load_model(model_path: str, input_size=768, device: str = 'cuda', dtype=None):
75
  model = MLP(input_size=input_size)
76
+ state = torch.load(model_path, map_location=device, weights_only=False)
77
  model.load_state_dict(state)
78
  model.to(device)
79
  if dtype: