Fix #4035
This commit is contained in:
parent
d4790fa6db
commit
36966e3200
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ def load_model_weights(model, checkpoint_info):
|
||||||
|
|
||||||
if shared.opts.sd_checkpoint_cache > 0:
|
if shared.opts.sd_checkpoint_cache > 0:
|
||||||
checkpoints_loaded[checkpoint_info] = model.state_dict().copy()
|
checkpoints_loaded[checkpoint_info] = model.state_dict().copy()
|
||||||
while len(checkpoints_loaded) > shared.opts.sd_checkpoint_cache:
|
while len(checkpoints_loaded) > shared.opts.sd_checkpoint_cache + 1:
|
||||||
checkpoints_loaded.popitem(last=False) # LRU
|
checkpoints_loaded.popitem(last=False) # LRU
|
||||||
else:
|
else:
|
||||||
print(f"Loading weights [{sd_model_hash}] from cache")
|
print(f"Loading weights [{sd_model_hash}] from cache")
|
||||||
|
|
Loading…
Reference in a new issue