Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#14216 from wfjsw/state-dict-ref-comp…
Browse files Browse the repository at this point in the history
…arison

change state dict comparison to ref compare
  • Loading branch information
AUTOMATIC1111 authored and ruchej committed Sep 30, 2024
1 parent e58f033 commit 2271615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sd_disable_initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def load_state_dict(original, module, state_dict, strict=True):
would be on the meta device.
"""

if state_dict == sd:
if state_dict is sd:
state_dict = {k: v.to(device="meta", dtype=v.dtype) for k, v in state_dict.items()}

original(module, state_dict, strict=strict)
Expand Down

0 comments on commit 2271615

Please sign in to comment.