1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 15:04:50 +08:00

add 'is_default' to model paths config (#4979)

* add 'is_default' to model paths config

including impl and doc in example file

* update weirdly overspecific test expectations

* oh there's two

* sigh
This commit is contained in:
Alex "mcmonkey" Goodwin
2024-09-19 21:59:55 +09:00
committed by GitHub
parent ad66f7c7d8
commit 68bb885d22
4 changed files with 13 additions and 5 deletions

View File

@@ -14,6 +14,9 @@ def load_extra_path_config(yaml_path):
if "base_path" in conf:
base_path = conf.pop("base_path")
base_path = os.path.expandvars(os.path.expanduser(base_path))
is_default = False
if "is_default" in conf:
is_default = conf.pop("is_default")
for x in conf:
for y in conf[x].split("\n"):
if len(y) == 0:
@@ -22,4 +25,4 @@ def load_extra_path_config(yaml_path):
if base_path is not None:
full_path = os.path.join(base_path, full_path)
logging.info("Adding extra search path {} {}".format(x, full_path))
folder_paths.add_model_folder_path(x, full_path)
folder_paths.add_model_folder_path(x, full_path, is_default)