Fix cases where a missing lora would result in NPE for abspath lookup. Fixes #620
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user