Add all_model_folders as possible entry to extra_model_paths so that all model-related paths will get mapped without needing to specify them individually

This commit is contained in:
Jedrzej Kosinski
2026-02-17 22:52:36 -08:00
parent 8ad38d2073
commit 631d4c1921
3 changed files with 165 additions and 0 deletions

View File

@@ -20,6 +20,16 @@ def load_extra_path_config(yaml_path):
is_default = False
if "is_default" in conf:
is_default = conf.pop("is_default")
all_model_folders = False
if "all_model_folders" in conf:
all_model_folders = conf.pop("all_model_folders")
if all_model_folders and base_path:
for folder_name in list(folder_paths.folder_names_and_paths.keys()):
if folder_name == "custom_nodes":
continue
full_path = os.path.normpath(os.path.join(base_path, folder_name))
logging.info("Adding extra search path {} {}".format(folder_name, full_path))
folder_paths.add_model_folder_path(folder_name, full_path, is_default)
for x in conf:
for y in conf[x].split("\n"):
if len(y) == 0: