From ba6d6de2ae4aab26e29f18ac096c9072449a8906 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Sun, 14 May 2023 17:50:41 -0500 Subject: [PATCH] Revert --- folder_paths.py | 23 +++++++---------------- server.py | 1 - 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/folder_paths.py b/folder_paths.py index f0fa06292..e5b89492c 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -139,21 +139,12 @@ def get_full_path(folder_name, filename): return full_path -path_cache_dict = {} - -def clear_cache(): - global path_cache_dict - path_cache_dict = {} - - def get_filename_list(folder_name): - global folder_names_and_paths, path_cache_dict - print("RecursiveWalk! " + folder_name) - if folder_name not in path_cache_dict: - output_list = set() - folders = folder_names_and_paths[folder_name] - for x in folders[0]: - output_list.update(filter_files_extensions(recursive_search(x), folders[1])) - path_cache_dict[folder_name] = sorted(list(output_list)) + global folder_names_and_paths + output_list = set() + folders = folder_names_and_paths[folder_name] + for x in folders[0]: + output_list.update(filter_files_extensions(recursive_search(x), folders[1])) + return sorted(list(output_list)) + - return path_cache_dict[folder_name] diff --git a/server.py b/server.py index 46508c70c..f52117f10 100644 --- a/server.py +++ b/server.py @@ -264,7 +264,6 @@ class PromptServer(): @routes.get("/object_info") async def get_object_info(request): out = {} - folder_paths.clear_cache() for x in nodes.NODE_CLASS_MAPPINGS: obj_class = nodes.NODE_CLASS_MAPPINGS[x] info = {}