Update invokeai/backend/model_manager/search.py

Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
This commit is contained in:
Lincoln Stein 2023-12-10 12:24:50 -05:00 committed by GitHub
parent 913c68982a
commit aab6369ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,11 +128,7 @@ class ModelSearch(ModelSearchBase):
def model_found(self, model: Path) -> None:
self.stats.models_found += 1
if not self.on_model_found:
self.stats.models_filtered += 1
self.models_found.add(model)
return
if self.on_model_found(model):
if not self.on_model_found or self.on_model_found(model):
self.stats.models_filtered += 1
self.models_found.add(model)