From cdc3b97dd5b8f3f7d4915ef9884e0432057cb1a0 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:02:01 +0300 Subject: [PATCH] resolve relative paths in YAML configuration for extra model paths (#5847) Signed-off-by: bigcat88 --- utils/extra_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/extra_config.py b/utils/extra_config.py index 90876590..415db042 100644 --- a/utils/extra_config.py +++ b/utils/extra_config.py @@ -24,5 +24,8 @@ def load_extra_path_config(yaml_path): full_path = y if base_path is not None: full_path = os.path.join(base_path, full_path) + elif not os.path.isabs(full_path): + yaml_dir = os.path.dirname(os.path.abspath(yaml_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)