From 7976956b6b78fd0b295f3795c0263c444e9751cf Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Sun, 2 Nov 2025 10:09:56 +0800 Subject: [PATCH] feat: add model_cache to plugin folder cleanup skip list Update the plugin cleanup process to preserve the model_cache folder along with settings.json and civitai. This prevents accidental deletion of cached model files during plugin updates, improving performance by avoiding unnecessary model re-downloads. --- py/routes/update_routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/routes/update_routes.py b/py/routes/update_routes.py index 365b5641..9be3cf1b 100644 --- a/py/routes/update_routes.py +++ b/py/routes/update_routes.py @@ -205,8 +205,8 @@ class UpdateRoutes: zip_path = tmp_zip_path - # Skip both settings.json and civitai folder - UpdateRoutes._clean_plugin_folder(plugin_root, skip_files=['settings.json', 'civitai']) + # Skip both settings.json, civitai and model cache folder + UpdateRoutes._clean_plugin_folder(plugin_root, skip_files=['settings.json', 'civitai', 'model_cache']) # Extract ZIP to temp dir with tempfile.TemporaryDirectory() as tmp_dir: