Ensure cache is created before reorder of folder paths.

This commit is contained in:
filtered 2025-01-26 14:10:40 +11:00
parent 6b686bdc26
commit 80abdea13b

View File

@ -10,6 +10,7 @@ from collections.abc import Collection
supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl', '.sft'} supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {} folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
base_path = os.path.dirname(os.path.realpath(__file__)) base_path = os.path.dirname(os.path.realpath(__file__))
models_dir = os.path.join(base_path, "models") models_dir = os.path.join(base_path, "models")
@ -44,8 +45,6 @@ temp_directory = os.path.join(base_path, "temp")
input_directory = os.path.join(base_path, "input") input_directory = os.path.join(base_path, "input")
user_directory = os.path.join(base_path, "user") user_directory = os.path.join(base_path, "user")
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
class CacheHelper: class CacheHelper:
""" """
Helper class for managing file list cache data. Helper class for managing file list cache data.