From f4fd513eb4e6f1059581826cb9be010ea558cd2b Mon Sep 17 00:00:00 2001 From: JaredTherriault Date: Wed, 10 Jul 2024 17:54:26 -0700 Subject: [PATCH] Possible fix for alternative paths not working --- py/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/py/utils.py b/py/utils.py index 8f7ccc3..de53d48 100644 --- a/py/utils.py +++ b/py/utils.py @@ -124,6 +124,19 @@ def map_to_range(value, input_min, input_max, output_min, output_max): def convert_relative_comfyui_path_to_full_path(relative_path="output"): + try: + path = folder_paths.get_directory_by_type(relative_path) + + if path: + return path + else: + paths = folder_paths.get_folder_paths(relative_path) + + if len(paths) > 0: + return paths[0] + except: + pass + return os.path.join(folder_paths.base_path, relative_path)