Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|