1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Normalize extra_model_config.yaml paths to prevent duplicates. (#6885)

* Normalize extra_model_config.yaml paths before adding.

* Fix tests.

* Fix tests.
This commit is contained in:
Robin Huang
2025-02-20 04:09:45 -08:00
committed by GitHub
parent c5be423d6b
commit 29d4384a75
2 changed files with 6 additions and 5 deletions

View File

@@ -29,5 +29,6 @@ def load_extra_path_config(yaml_path):
full_path = os.path.join(base_path, full_path)
elif not os.path.isabs(full_path):
full_path = os.path.abspath(os.path.join(yaml_dir, y))
logging.info("Adding extra search path {} {}".format(x, full_path))
folder_paths.add_model_folder_path(x, full_path, is_default)
normalized_path = os.path.normpath(full_path)
logging.info("Adding extra search path {} {}".format(x, normalized_path))
folder_paths.add_model_folder_path(x, normalized_path, is_default)