Commit eb52c803 authored by AUTOMATIC1111's avatar AUTOMATIC1111
Browse files

Merge pull request #14216 from wfjsw/state-dict-ref-comparison

change state dict comparison to ref compare
parent f8871ded
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ class LoadStateDictOnMeta(ReplaceHelper):
            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)