Skip to content

Commit

Permalink
resolve relative paths in YAML configuration for extra model paths (c…
Browse files Browse the repository at this point in the history
…omfyanonymous#5847)

Signed-off-by: bigcat88 <[email protected]>
  • Loading branch information
bigcat88 authored Dec 3, 2024
1 parent 8d4e063 commit cdc3b97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/extra_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit cdc3b97

Please sign in to comment.