Skip to content

Commit a9f4762

Browse files
committed
restruct certain keys to be checked for peft config update.
1 parent 3579cd2 commit a9f4762

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/diffusers/loaders/peft.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"LTXVideoTransformer3DModel": lambda model_cls, weights: weights,
5454
"SanaTransformer2DModel": lambda model_cls, weights: weights,
5555
}
56+
_NO_CONFIG_UPDATE_KEYS = ["to_k", "to_q", "to_v"]
5657

5758

5859
def _maybe_adjust_config(config):
@@ -67,6 +68,8 @@ def _maybe_adjust_config(config):
6768
original_r = config["r"]
6869

6970
for key in list(rank_pattern.keys()):
71+
if any(prefix in key for prefix in _NO_CONFIG_UPDATE_KEYS):
72+
continue
7073
key_rank = rank_pattern[key]
7174

7275
# try to detect ambiguity

0 commit comments

Comments
 (0)