mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: add ability to load checkpoints and loras from multiple locations (#1256)
* Add ability to load checkpoints and loras from multiple locations * Found another location a default path is required * feat: use array as default --------- Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
This commit is contained in:
co-authored by
Manuel Schmid
parent
7cfb5e742d
commit
ef1999c52c
@@ -11,6 +11,7 @@ from extras.expansion import FooocusExpansion
|
||||
|
||||
from ldm_patched.modules.model_base import SDXL, SDXLRefiner
|
||||
from modules.sample_hijack import clip_separate
|
||||
from modules.util import get_file_from_folder_list
|
||||
|
||||
|
||||
model_base = core.StableDiffusionModel()
|
||||
@@ -60,7 +61,7 @@ def assert_model_integrity():
|
||||
def refresh_base_model(name):
|
||||
global model_base
|
||||
|
||||
filename = os.path.abspath(os.path.realpath(os.path.join(modules.config.path_checkpoints, name)))
|
||||
filename = get_file_from_folder_list(name, modules.config.paths_checkpoints)
|
||||
|
||||
if model_base.filename == filename:
|
||||
return
|
||||
@@ -76,7 +77,7 @@ def refresh_base_model(name):
|
||||
def refresh_refiner_model(name):
|
||||
global model_refiner
|
||||
|
||||
filename = os.path.abspath(os.path.realpath(os.path.join(modules.config.path_checkpoints, name)))
|
||||
filename = get_file_from_folder_list(name, modules.config.paths_checkpoints)
|
||||
|
||||
if model_refiner.filename == filename:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user