From 0d2b5e081963011b4e011339bdfeead750f6554e Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Fri, 5 Jun 2026 11:59:05 +0200 Subject: [PATCH] fix: detect new input-folder files across restarts Same root cause as the node-update bug: the input file list (LoadImage etc. do os.listdir(input) in INPUT_TYPES) is baked into the cached object_info, which persists across restarts, so new input files were invisible until a manual refresh. The input dir is listed non-recursively, so its own mtime reliably flags add/remove -- fold it (one stat) into the node fingerprint so a restart picks up new input files. Model folders are nested + on a slow mount, so they are intentionally not fingerprinted (use a refresh button for new models). Co-Authored-By: Claude Opus 4.8 --- __init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 1779316..b1c78d7 100644 --- a/__init__.py +++ b/__init__.py @@ -362,7 +362,16 @@ def _current_node_signature(): except Exception as e: # pragma: no cover log.warning("Tenaciousload: custom_nodes code hash failed: %s", e) code = "" - return f"{len(keys)}:{h.hexdigest()}:{code}" + # input-dir mtime: LoadImage etc. list the input folder (non-recursively) in + # their INPUT_TYPES, so it rides along in object_info. The dir's own mtime + # changes when files are added/removed there, so a restart picks them up. + # (Cheap: one stat. Model folders are on a slow mount + nested, so they are + # NOT fingerprinted here — use a refresh button for new models.) + try: + inp = str(os.path.getmtime(folder_paths.get_input_directory())) + except Exception: + inp = "" + return f"{len(keys)}:{h.hexdigest()}:{code}:{inp}" def _check_node_signature():