Files
brantje a2454c39e7 "Added API, metrics & logging while juggling chainsaws"
Love API? Me too. Added a robust API for model and image handling, sprinkled in Prometheus metrics for fun graphs, and tossed in colorful logging because why not? Pretty sure I even taught it to make coffee (spoiler: it doesn’t). All aboard the functionality express! 🚂
2025-04-09 20:09:52 +00:00

14 lines
434 B
Python

import folder_paths
def refresh_folder(folder_name: str) -> list:
if not folder_name:
raise ValueError("folder_name is required")
if folder_name not in folder_paths.folder_names_and_paths:
raise ValueError("invalid folder_name or folder_name not initialized")
result = folder_paths.get_filename_list_(folder_name)
folder_paths.filename_list_cache[folder_name] = result
return result[0]