OmniSVG commited on
Commit
d45d803
·
verified ·
1 Parent(s): 8931798

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -55,7 +55,11 @@ def load_models():
55
 
56
  #model = Qwen2_5_VLForConditionalGeneration.from_pretrained("OmniSVG/OmniSVG-3B")
57
  #print("Loading Successfully!")
58
- sketch_weight_path = "https://huggingface.co/OmniSVG/OmniSVG-3B/resolve/main/pytorch_model.bin"
 
 
 
 
59
  sketch_decoder.load_state_dict(torch.load(sketch_weight_path))
60
  sketch_decoder = sketch_decoder.to(device).eval()
61
 
 
55
 
56
  #model = Qwen2_5_VLForConditionalGeneration.from_pretrained("OmniSVG/OmniSVG-3B")
57
  #print("Loading Successfully!")
58
+ # 使用 huggingface_hub 下载模型文件
59
+ sketch_weight_path = hf_hub_download(
60
+ repo_id="OmniSVG/OmniSVG-3B",
61
+ filename="pytorch_model.bin",
62
+ cache_dir="./models")
63
  sketch_decoder.load_state_dict(torch.load(sketch_weight_path))
64
  sketch_decoder = sketch_decoder.to(device).eval()
65