Spaces:
Runtime error
Runtime error
Update download.py
Browse files- download.py +13 -13
download.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import os
|
2 |
import time
|
3 |
import torch
|
4 |
-
#
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
7 |
class OMG_download():
|
@@ -25,13 +25,13 @@ class OMG_download():
|
|
25 |
def download_model_sam(self):
|
26 |
REPO_ID = 'han-cai/efficientvit-sam'
|
27 |
filename_list = ['xl1.pt']
|
28 |
-
if not os.path.exists('/
|
29 |
-
os.makedirs('/
|
30 |
for filename in filename_list:
|
31 |
-
local_file = os.path.join('/
|
32 |
|
33 |
if not os.path.exists(local_file):
|
34 |
-
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='/
|
35 |
|
36 |
def download_model_yoloworld(self):
|
37 |
REPO_ID = 'Fucius/OMG'
|
@@ -58,24 +58,24 @@ class OMG_download():
|
|
58 |
def download_characters(self):
|
59 |
REPO_ID = 'Fucius/OMG'
|
60 |
filename_list = ['lora/chris-evans.safetensors', 'lora/Harry_Potter.safetensors', 'lora/Hermione_Granger.safetensors', 'lora/jordan_torres_v2_xl.safetensors', 'lora/keira_lora_sdxl_v1-000008.safetensors', 'lora/lawrence_dh128_v1-step00012000.safetensors', 'lora/Gleb-Savchenko_Liam-Hemsworth.safetensors', 'lora/TaylorSwiftSDXL.safetensors']
|
61 |
-
if not os.path.exists('./checkpoints/
|
62 |
-
os.makedirs('./checkpoints/
|
63 |
for filename in filename_list:
|
64 |
-
local_file = os.path.join('./checkpoints/
|
65 |
|
66 |
if not os.path.exists(local_file):
|
67 |
-
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/
|
68 |
local_dir_use_symlinks=False)
|
69 |
def download_styles(self):
|
70 |
REPO_ID = 'Fucius/OMG'
|
71 |
filename_list = ['style/EldritchPaletteKnife.safetensors', 'style/Cinematic Hollywood Film.safetensors', 'style/Anime_Sketch_SDXL.safetensors']
|
72 |
-
if not os.path.exists('./checkpoints/
|
73 |
-
os.makedirs('./checkpoints/
|
74 |
for filename in filename_list:
|
75 |
-
local_file = os.path.join('./checkpoints/
|
76 |
|
77 |
if not os.path.exists(local_file):
|
78 |
-
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/
|
79 |
local_dir_use_symlinks=False)
|
80 |
|
81 |
if __name__ == '__main__':
|
|
|
1 |
import os
|
2 |
import time
|
3 |
import torch
|
4 |
+
#os.environ['HF_ENDPOINT']="https://hf-mirror.com"
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
7 |
class OMG_download():
|
|
|
25 |
def download_model_sam(self):
|
26 |
REPO_ID = 'han-cai/efficientvit-sam'
|
27 |
filename_list = ['xl1.pt']
|
28 |
+
if not os.path.exists('./checkpoints/sam/'):
|
29 |
+
os.makedirs('./checkpoints/sam/')
|
30 |
for filename in filename_list:
|
31 |
+
local_file = os.path.join('./checkpoints/sam/', filename)
|
32 |
|
33 |
if not os.path.exists(local_file):
|
34 |
+
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/sam/', local_dir_use_symlinks=False)
|
35 |
|
36 |
def download_model_yoloworld(self):
|
37 |
REPO_ID = 'Fucius/OMG'
|
|
|
58 |
def download_characters(self):
|
59 |
REPO_ID = 'Fucius/OMG'
|
60 |
filename_list = ['lora/chris-evans.safetensors', 'lora/Harry_Potter.safetensors', 'lora/Hermione_Granger.safetensors', 'lora/jordan_torres_v2_xl.safetensors', 'lora/keira_lora_sdxl_v1-000008.safetensors', 'lora/lawrence_dh128_v1-step00012000.safetensors', 'lora/Gleb-Savchenko_Liam-Hemsworth.safetensors', 'lora/TaylorSwiftSDXL.safetensors']
|
61 |
+
if not os.path.exists('./checkpoints/'):
|
62 |
+
os.makedirs('./checkpoints/')
|
63 |
for filename in filename_list:
|
64 |
+
local_file = os.path.join('./checkpoints/', filename)
|
65 |
|
66 |
if not os.path.exists(local_file):
|
67 |
+
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/',
|
68 |
local_dir_use_symlinks=False)
|
69 |
def download_styles(self):
|
70 |
REPO_ID = 'Fucius/OMG'
|
71 |
filename_list = ['style/EldritchPaletteKnife.safetensors', 'style/Cinematic Hollywood Film.safetensors', 'style/Anime_Sketch_SDXL.safetensors']
|
72 |
+
if not os.path.exists('./checkpoints/'):
|
73 |
+
os.makedirs('./checkpoints/')
|
74 |
for filename in filename_list:
|
75 |
+
local_file = os.path.join('./checkpoints/', filename)
|
76 |
|
77 |
if not os.path.exists(local_file):
|
78 |
+
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/',
|
79 |
local_dir_use_symlinks=False)
|
80 |
|
81 |
if __name__ == '__main__':
|