mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix model cache gc.collect() condition. (#5036)
See https://github.com/invoke-ai/InvokeAI/pull/5034#discussion_r1382381733
This commit is contained in:
commit
2bbba323c6
@ -493,7 +493,7 @@ class ModelCache(object):
|
||||
else:
|
||||
pos += 1
|
||||
|
||||
if models_cleared < 0:
|
||||
if models_cleared > 0:
|
||||
# There would likely be some 'garbage' to be collected regardless of whether a model was cleared or not, but
|
||||
# there is a significant time cost to calling `gc.collect()`, so we want to use it sparingly. (The time cost
|
||||
# is high even if no garbage gets collected.)
|
||||
|
Loading…
Reference in New Issue
Block a user