Skip to content

Commit

Permalink
Merge branch 'main' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonRide303 committed Sep 20, 2023
2 parents ef762d4 + c9ec6e2 commit f95f086
Show file tree
Hide file tree
Showing 22 changed files with 1,619 additions and 265 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @lllyasviel
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ __pycache__
**/*.pth
**/*.pt
**/*.bin
**/*.patch
**/*.yaml
**/*.png
!taesdxl_decoder.pth
user_path_config.txt
/repositories
/venv
/tmp
Expand Down
2 changes: 1 addition & 1 deletion fooocus_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = '2.0.19 MRE'
version = '2.0.73 MRE'
full_version = 'Fooocus ' + version
16 changes: 11 additions & 5 deletions launch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"


import sys
import platform
import fooocus_version
Expand All @@ -10,13 +9,12 @@
from modules.launch_util import 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, lorafile_path, clip_vision_path, controlnet_path, vae_approx_path, fooocus_expansion_path
from modules.path import modelfile_path, lorafile_path, clip_vision_path, controlnet_path, vae_approx_path, fooocus_expansion_path, upscale_models_path


REINSTALL_ALL = False
DEFAULT_ARGS = ['--disable-smart-memory', '--disable-cuda-malloc']


def prepare_environment():
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
torch_command = os.environ.get('TORCH_COMMAND',
Expand Down Expand Up @@ -86,8 +84,14 @@ def prepare_environment():
]

vae_approx_filenames = [
('taesdxl_decoder.pth',
'https://huggingface.co/lllyasviel/misc/resolve/main/taesdxl_decoder.pth')
('xlvaeapp.pth',
'https://huggingface.co/lllyasviel/misc/resolve/main/xlvaeapp.pth')
]


upscaler_filenames = [
('fooocus_upscaler_s409985e5.bin',
'https://huggingface.co/lllyasviel/misc/resolve/main/fooocus_upscaler_s409985e5.bin')
]


Expand All @@ -102,6 +106,8 @@ def download_models():
load_file_from_url(url=url, model_dir=controlnet_path, file_name=file_name)
for file_name, url in vae_approx_filenames:
load_file_from_url(url=url, model_dir=vae_approx_path, file_name=file_name)
for file_name, url in upscaler_filenames:
load_file_from_url(url=url, model_dir=upscale_models_path, file_name=file_name)

load_file_from_url(
url='https://huggingface.co/lllyasviel/misc/resolve/main/fooocus_expansion.bin',
Expand Down
Binary file removed models/vae_approx/taesdxl_decoder.pth
Binary file not shown.
Loading

0 comments on commit f95f086

Please sign in to comment.