From 49be2f4deca86c972effca108f18d259808a4cd2 Mon Sep 17 00:00:00 2001 From: nullquant Date: Wed, 15 May 2024 12:41:06 +0300 Subject: [PATCH] last slash quick fix --- brushnet_nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brushnet_nodes.py b/brushnet_nodes.py index 1665055..086929b 100644 --- a/brushnet_nodes.py +++ b/brushnet_nodes.py @@ -588,12 +588,16 @@ def get_files_with_extension(folder_name, extension=['safetensors']): return ([], '') #raise Exception("Can't find", folder_name, " path") + while not inpaint_path[-1].isalpha(): + inpaint_path = inpaint_path[:-1] + abs_list = [] for x in os.walk(inpaint_path): for name in x[2]: for ext in extension: if ext in name: abs_list.append(os.path.join(x[0], name)) + abs_list = set(abs_list) names = [] for x in abs_list: remain = x