VOIDER commited on
Commit
983aac3
·
verified ·
1 Parent(s): 6c26275

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -94,10 +94,10 @@ class WaifuScorer:
94
  self.verbose = verbose
95
  if model_path is None:
96
  # Use default repo path – if the model file is not present locally, it will be downloaded.
97
- model_path = "Eugeoter/waifu-scorer-v4-beta/model.pth"
98
  if not os.path.isfile(model_path):
99
  from huggingface_hub import hf_hub_download
100
- model_path = hf_hub_download("Eugeoter/waifu-scorer-v4-beta", "model.pth", cache_dir=cache_dir)
101
  print(f"Loading pretrained WaifuScorer model from {model_path}")
102
  self.mlp = load_model(model_path, input_size=768, device=device)
103
  self.model2, self.preprocess = load_clip_models("ViT-L/14", device=device)
 
94
  self.verbose = verbose
95
  if model_path is None:
96
  # Use default repo path – if the model file is not present locally, it will be downloaded.
97
+ model_path = "Eugeoter/waifu-scorer-v4-beta/model.safetensors"
98
  if not os.path.isfile(model_path):
99
  from huggingface_hub import hf_hub_download
100
+ model_path = hf_hub_download("Eugeoter/waifu-scorer-v4-beta", "model.safetensors", cache_dir=cache_dir)
101
  print(f"Loading pretrained WaifuScorer model from {model_path}")
102
  self.mlp = load_model(model_path, input_size=768, device=device)
103
  self.model2, self.preprocess = load_clip_models("ViT-L/14", device=device)