Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import argparse
|
|
9 |
import gc
|
10 |
import yaml
|
11 |
import glob
|
|
|
12 |
|
13 |
|
14 |
from decoder import SketchDecoder
|
@@ -58,8 +59,7 @@ def load_models():
|
|
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 |
|
|
|
9 |
import gc
|
10 |
import yaml
|
11 |
import glob
|
12 |
+
from huggingface_hub import hf_hub_download
|
13 |
|
14 |
|
15 |
from decoder import SketchDecoder
|
|
|
59 |
# 使用 huggingface_hub 下载模型文件
|
60 |
sketch_weight_path = hf_hub_download(
|
61 |
repo_id="OmniSVG/OmniSVG-3B",
|
62 |
+
filename="pytorch_model.bin",)
|
|
|
63 |
sketch_decoder.load_state_dict(torch.load(sketch_weight_path))
|
64 |
sketch_decoder = sketch_decoder.to(device).eval()
|
65 |
|