Skip to content

Commit 160a4d3

Browse files
committed
fix split key
1 parent 3a74c7e commit 160a4d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/loaders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def __init__(self, state_dict: Dict[str, torch.Tensor]):
7070
self.mapping = dict(enumerate(state_dict.keys()))
7171
self.rev_mapping = {v: k for k, v in enumerate(state_dict.keys())}
7272

73-
# .processor for unet, .k_proj, ".q_proj", ".v_proj", and ".out_proj" for text encoder
74-
self.split_keys = [".processor", ".k_proj", ".q_proj", ".v_proj", ".out_proj"]
73+
# .processor for unet, .self_attn for text encoder
74+
self.split_keys = [".processor", ".self_attn"]
7575

7676
# we add a hook to state_dict() and load_state_dict() so that the
7777
# naming fits with `unet.attn_processors`

0 commit comments

Comments
 (0)