lllyasviel commited on
Commit
75a78b0
·
1 Parent(s): 0b33786
Files changed (4) hide show
  1. launch.py +2 -2
  2. model_files/tmp30tvf0zr +0 -0
  3. modules/path.py +3 -0
  4. webui.py +17 -3
launch.py CHANGED
@@ -5,6 +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
 
9
 
10
  REINSTALL_ALL = False
@@ -52,7 +53,6 @@ def prepare_environment():
52
  return
53
 
54
 
55
- model_file_path = os.path.abspath('./model_files/')
56
  model_filenames = [
57
  ('sd_xl_base_1.0.safetensors', 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors'),
58
  ('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 = [
61
 
62
  def download_models():
63
  for file_name, url in model_filenames:
64
- load_file_from_url(url=url, model_dir=model_file_path, file_name=file_name)
65
  return
66
 
67
 
 
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
 
11
  REINSTALL_ALL = False
 
53
  return
54
 
55
 
 
56
  model_filenames = [
57
  ('sd_xl_base_1.0.safetensors', 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors'),
58
  ('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
 
62
  def download_models():
63
  for file_name, url in model_filenames:
64
+ load_file_from_url(url=url, model_dir=modelfile_path, file_name=file_name)
65
  return
66
 
67
 
model_files/tmp30tvf0zr DELETED
File without changes
modules/path.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import os
2
+
3
+ modelfile_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../model_files'))
webui.py CHANGED
@@ -1,5 +1,19 @@
1
- print('hello word')
 
2
 
3
- from nodes import CheckpointLoader
 
 
 
 
 
 
4
 
5
- print(CheckpointLoader)
 
 
 
 
 
 
 
 
1
+ import os
2
+ from comfy.sd import load_checkpoint_guess_config
3
 
4
+ from nodes import (
5
+ VAEDecode,
6
+ KSamplerAdvanced,
7
+ EmptyLatentImage,
8
+ SaveImage,
9
+ CLIPTextEncode,
10
+ )
11
 
12
+ from modules.path import modelfile_path
13
+
14
+
15
+ xl_base_filename = os.path.join(modelfile_path, 'sd_xl_base_1.0.safetensors')
16
+ xl_refiner_filename = os.path.join(modelfile_path, 'sd_xl_refiner_1.0.safetensors')
17
+
18
+ ckpts = load_checkpoint_guess_config(xl_base_filename)
19
+ a = 0