mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 04:10:15 +08:00
Merge 8141c32763 into ec0a832acb
This commit is contained in:
commit
3956901ac0
@ -11,24 +11,20 @@ def load_extra_path_config(yaml_path):
|
|||||||
conf = config[c]
|
conf = config[c]
|
||||||
if conf is None:
|
if conf is None:
|
||||||
continue
|
continue
|
||||||
base_path = None
|
if "base_path" in c:
|
||||||
if "base_path" in conf:
|
base_path = os.path.expandvars(os.path.expanduser(conf))
|
||||||
base_path = conf.pop("base_path")
|
|
||||||
base_path = os.path.expandvars(os.path.expanduser(base_path))
|
|
||||||
if not os.path.isabs(base_path):
|
if not os.path.isabs(base_path):
|
||||||
base_path = os.path.abspath(os.path.join(yaml_dir, base_path))
|
base_path = os.path.abspath(os.path.join(yaml_dir, base_path))
|
||||||
is_default = False
|
continue
|
||||||
if "is_default" in conf:
|
if "is_default" in conf:
|
||||||
is_default = conf.pop("is_default")
|
continue
|
||||||
for x in conf:
|
if len(conf) == 0:
|
||||||
for y in conf[x].split("\n"):
|
continue
|
||||||
if len(y) == 0:
|
full_path = conf
|
||||||
continue
|
if base_path:
|
||||||
full_path = y
|
full_path = os.path.join(base_path, full_path)
|
||||||
if base_path:
|
elif not os.path.isabs(full_path):
|
||||||
full_path = os.path.join(base_path, full_path)
|
full_path = os.path.abspath(os.path.join(yaml_dir, conf))
|
||||||
elif not os.path.isabs(full_path):
|
normalized_path = os.path.normpath(full_path)
|
||||||
full_path = os.path.abspath(os.path.join(yaml_dir, y))
|
logging.info("Adding extra search path {} {}".format(c, normalized_path))
|
||||||
normalized_path = os.path.normpath(full_path)
|
folder_paths.add_model_folder_path(c, normalized_path, False)
|
||||||
logging.info("Adding extra search path {} {}".format(x, normalized_path))
|
|
||||||
folder_paths.add_model_folder_path(x, normalized_path, is_default)
|
|
||||||
Loading…
Reference in New Issue
Block a user