Skip to content

Commit

Permalink
use dict[key]=model; did not update orderdict order, should use move …
Browse files Browse the repository at this point in the history
…to end
  • Loading branch information
chu8129 authored Sep 15, 2023
1 parent 5ef669d commit 813535d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def get_checkpoint_state_dict(checkpoint_info: CheckpointInfo, timer):
if checkpoint_info in checkpoints_loaded:
# use checkpoint cache
print(f"Loading weights [{sd_model_hash}] from cache")
checkpoints_loaded.move_to_end(checkpoint_info)
return checkpoints_loaded[checkpoint_info]

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

0 comments on commit 813535d

Please sign in to comment.