From eadc24ecc8bfc3c80fcc50724c0ebe74489f255b Mon Sep 17 00:00:00 2001 From: rgthree Date: Tue, 11 Nov 2025 19:55:20 -0500 Subject: [PATCH] Fix cases where a missing lora would result in NPE for abspath lookup. Fixes #620 --- py/server/utils_info.py | 2 +- py/utils.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py/server/utils_info.py b/py/server/utils_info.py index 5b5963d..4723a66 100644 --- a/py/server/utils_info.py +++ b/py/server/utils_info.py @@ -415,7 +415,7 @@ def get_folder_path(file: str, model_type) -> str | None: """Gets the file path ensuring it exists.""" file_path = folder_paths.get_full_path(model_type, file) if not file_exists(file_path): - filepath = abspath(file_path) + file_path = abspath(file_path) if not file_exists(file_path): file_path = None return file_path diff --git a/py/utils.py b/py/utils.py index 55bcf26..f3927e3 100644 --- a/py/utils.py +++ b/py/utils.py @@ -152,7 +152,7 @@ def remove_path(path): def abspath(file_path: str): """Resolves the abspath of a file, resolving symlinks and user dirs.""" - if not path_exists(file_path): + if file_path and not path_exists(file_path): maybe_path = os.path.abspath(os.path.realpath(os.path.expanduser(file_path))) file_path = maybe_path if path_exists(maybe_path) else file_path return file_path diff --git a/pyproject.toml b/pyproject.toml index 2cad497..b868543 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "rgthree-comfy" description = "Making ComfyUI more comfortable." -version = "1.0.2511102355" +version = "1.0.2511111955" license = { file = "LICENSE" } dependencies = []