i
This commit is contained in:
parent
2f95d3ae60
commit
3e91917de7
@ -5,6 +5,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
|
||||
from modules.path import modelfile_path
|
||||
|
||||
|
||||
REINSTALL_ALL = False
|
||||
@ -52,7 +53,6 @@ def prepare_environment():
|
||||
return
|
||||
|
||||
|
||||
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')
|
||||
@ -61,7 +61,7 @@ model_filenames = [
|
||||
|
||||
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)
|
||||
load_file_from_url(url=url, model_dir=modelfile_path, file_name=file_name)
|
||||
return
|
||||
|
||||
|
||||
|
3
modules/path.py
Normal file
3
modules/path.py
Normal file
@ -0,0 +1,3 @@
|
||||
import os
|
||||
|
||||
modelfile_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../model_files'))
|
20
webui.py
20
webui.py
@ -1,5 +1,19 @@
|
||||
print('hello word')
|
||||
import os
|
||||
from comfy.sd import load_checkpoint_guess_config
|
||||
|
||||
from nodes import CheckpointLoader
|
||||
from nodes import (
|
||||
VAEDecode,
|
||||
KSamplerAdvanced,
|
||||
EmptyLatentImage,
|
||||
SaveImage,
|
||||
CLIPTextEncode,
|
||||
)
|
||||
|
||||
print(CheckpointLoader)
|
||||
from modules.path import modelfile_path
|
||||
|
||||
|
||||
xl_base_filename = os.path.join(modelfile_path, 'sd_xl_base_1.0.safetensors')
|
||||
xl_refiner_filename = os.path.join(modelfile_path, 'sd_xl_refiner_1.0.safetensors')
|
||||
|
||||
ckpts = load_checkpoint_guess_config(xl_base_filename)
|
||||
a = 0
|
||||
|
Loading…
Reference in New Issue
Block a user