Spaces:
Sleeping
Sleeping
Update download.py
Browse files- download.py +17 -0
download.py
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from huggingface_hub import snapshot_download
|
| 3 |
+
|
| 4 |
+
# Define where you want to store the model
|
| 5 |
+
# If using HF Persistent Storage, change this to "/data/model_weights"
|
| 6 |
+
LOCAL_MODEL_PATH = "./model_weights"
|
| 7 |
+
|
| 8 |
+
print(f"Downloading OmniSVG 1.1 8B to {LOCAL_MODEL_PATH}...")
|
| 9 |
+
|
| 10 |
+
snapshot_download(
|
| 11 |
+
repo_id="OmniSVG/OmniSVG1.1_8B",
|
| 12 |
+
local_dir=LOCAL_MODEL_PATH,
|
| 13 |
+
local_dir_use_symlinks=False, # Important: Downloads actual files, not just links
|
| 14 |
+
ignore_patterns=["*.msgpack", "*.h5", "*.ot"] # Optional: Skip non-pytorch files to save space
|
| 15 |
+
)
|
| 16 |
+
|
| 17 |
+
print("Download complete. You can now load from this local path.")
|