From c6fe88bf660d2ad54c551c98b04a1719d57a996c Mon Sep 17 00:00:00 2001 From: nick Date: Sat, 15 Jun 2024 17:29:51 -0700 Subject: [PATCH] new route --- custom_routes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_routes.py b/custom_routes.py index 4b678dd..6030027 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -1059,3 +1059,9 @@ def run_in_new_thread(coroutine): if cd_enable_log: run_in_new_thread(watch_file_changes(log_file_path, send_logs_to_websocket)) + +# use after calling GET /object_info (it populates the `filename_list_cache` variable) +@server.PromptServer.instance.routes.get("/comfyui-deploy/filename_list_cache") +async def get_filename_list_cache(_): + from folder_paths import filename_list_cache + return web.json_response({'filename_list': filename_list_cache}) \ No newline at end of file