This commit is contained in:
lvmin
2023-08-10 04:43:08 -07:00
parent 9e92cabb6b
commit 2f95d3ae60
3 changed files with 40 additions and 1 deletions
+15 -1
View File
@@ -4,6 +4,7 @@ import platform
from modules.launch_util import commit_hash, fooocus_tag, is_installed, run, python, \
run_pip, repo_dir, git_clone, requirements_met, script_path, dir_repos
from modules.model_loader import load_file_from_url
REINSTALL_ALL = False
@@ -51,8 +52,21 @@ def prepare_environment():
return
prepare_environment()
model_file_path = os.path.abspath('./model_files/')
model_filenames = [
('sd_xl_base_1.0.safetensors', 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors'),
('sd_xl_refiner_1.0.safetensors', 'https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors')
]
def download_models():
for file_name, url in model_filenames:
load_file_from_url(url=url, model_dir=model_file_path, file_name=file_name)
return
prepare_environment()
download_models()
from webui import *