Spaces:
Paused
Paused
lllyasviel
commited on
Commit
·
244a6d4
1
Parent(s):
d34c85d
- launch.py +8 -1
- modules/path.py +1 -0
launch.py
CHANGED
@@ -5,7 +5,7 @@ import platform
|
|
5 |
from modules.launch_util import commit_hash, fooocus_tag, is_installed, run, python, \
|
6 |
run_pip, repo_dir, git_clone, requirements_met, script_path, dir_repos
|
7 |
from modules.model_loader import load_file_from_url
|
8 |
-
from modules.path import modelfile_path
|
9 |
|
10 |
REINSTALL_ALL = False
|
11 |
|
@@ -61,10 +61,17 @@ model_filenames = [
|
|
61 |
'https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors')
|
62 |
]
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
def download_models():
|
66 |
for file_name, url in model_filenames:
|
67 |
load_file_from_url(url=url, model_dir=modelfile_path, file_name=file_name)
|
|
|
|
|
68 |
return
|
69 |
|
70 |
|
|
|
5 |
from modules.launch_util import commit_hash, fooocus_tag, is_installed, run, python, \
|
6 |
run_pip, repo_dir, git_clone, requirements_met, script_path, dir_repos
|
7 |
from modules.model_loader import load_file_from_url
|
8 |
+
from modules.path import modelfile_path, lorafile_path
|
9 |
|
10 |
REINSTALL_ALL = False
|
11 |
|
|
|
61 |
'https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors')
|
62 |
]
|
63 |
|
64 |
+
lora_filenames = [
|
65 |
+
('sd_xl_offset_example-lora_1.0.safetensors',
|
66 |
+
'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors')
|
67 |
+
]
|
68 |
+
|
69 |
|
70 |
def download_models():
|
71 |
for file_name, url in model_filenames:
|
72 |
load_file_from_url(url=url, model_dir=modelfile_path, file_name=file_name)
|
73 |
+
for file_name, url in lora_filenames:
|
74 |
+
load_file_from_url(url=url, model_dir=lorafile_path, file_name=file_name)
|
75 |
return
|
76 |
|
77 |
|
modules/path.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
import os
|
2 |
|
3 |
modelfile_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../models/checkpoints/'))
|
|
|
|
1 |
import os
|
2 |
|
3 |
modelfile_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../models/checkpoints/'))
|
4 |
+
lorafile_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../models/loras/'))
|