Skip to content

Commit 813535d

Browse files
authored
use dict[key]=model; did not update orderdict order, should use move to end
1 parent 5ef669d commit 813535d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/sd_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ def get_checkpoint_state_dict(checkpoint_info: CheckpointInfo, timer):
309309
if checkpoint_info in checkpoints_loaded:
310310
# use checkpoint cache
311311
print(f"Loading weights [{sd_model_hash}] from cache")
312+
checkpoints_loaded.move_to_end(checkpoint_info)
312313
return checkpoints_loaded[checkpoint_info]
313314

314315
print(f"Loading weights [{sd_model_hash}] from {checkpoint_info.filename}")

0 commit comments

Comments
 (0)