Skip to content

Commit aa02ebf

Browse files
committed
Fix model cache gc.collect() condition.
1 parent fb3d0c4 commit aa02ebf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

invokeai/backend/model_management/model_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def _make_cache_room(self, model_size):
493493
else:
494494
pos += 1
495495

496-
if models_cleared < 0:
496+
if models_cleared > 0:
497497
# There would likely be some 'garbage' to be collected regardless of whether a model was cleared or not, but
498498
# there is a significant time cost to calling `gc.collect()`, so we want to use it sparingly. (The time cost
499499
# is high even if no garbage gets collected.)

0 commit comments

Comments
 (0)