Commit Graph

1 Commits

Author SHA1 Message Date
abhay-codes07
7f747f0e68
Fix model file list cache never being reused
cache_model_file_list_ compared os.path.getmtime(folder) (a float)
against model_file_list_cache[1] (the dirs dict), which is always
unequal, so the check returned None on every call and the model tree
was re-walked on each /experiment/models request.

The top-level folder was also never recorded in dirs, so drop the
broken scalar comparison and instead seed the folder's own mtime into
dirs (matching folder_paths.recursive_search) so it is validated by the
existing per-directory loop and direct additions still invalidate the cache.
2026-07-12 14:53:28 +05:30