From 3f6824eef62b1ad676dadcd845b45be1631e491b Mon Sep 17 00:00:00 2001 From: Will Miao Date: Thu, 28 May 2026 12:00:25 +0800 Subject: [PATCH] fix(example-images): exclude failed_models from check_pending_models pending count Previously check_pending_models() only skipped models already in processed_models, so models that had permanently failed (no CivitAI images available, download errors) were forever reported as "pending". This caused repeated auto-download cycles with no actual work to do. Co-Authored-By: Claude Opus 4.7 --- py/utils/example_images_download_manager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/py/utils/example_images_download_manager.py b/py/utils/example_images_download_manager.py index b6c1a0a5..0ecae86f 100644 --- a/py/utils/example_images_download_manager.py +++ b/py/utils/example_images_download_manager.py @@ -397,13 +397,12 @@ class DownloadManager: models_with_hash = len(all_models_with_hash) - # Calculate pending count: check which models actually need processing - # A model is pending if it has a hash, is not in processed_models, - # and its folder doesn't exist or is empty + # Calculate pending count: check which models actually need processing. + # A model is pending if it has a hash, is not already processed or known-failed, + # and its folder doesn't exist or is empty. pending_hashes = set() for model_hash, model_name in all_models_with_hash: - if model_hash not in processed_models: - # Check if model folder exists with files + if model_hash not in processed_models and model_hash not in failed_models: model_dir = ExampleImagePathResolver.get_model_folder( model_hash, active_library )