We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5459b60 commit a81351bCopy full SHA for a81351b
src/diffusers/loaders/peft.py
@@ -74,6 +74,10 @@ def _maybe_adjust_config(config):
74
key_rank = rank_pattern[key]
75
76
# try to detect ambiguity
77
+ # `target_modules` can also be a str, in which case this loop would loop
78
+ # over the chars of the str. The technically correct way to match LoRA keys
79
+ # in PEFT is to use LoraModel._check_target_module_exists (lora_config, key).
80
+ # But this cuts it for now.
81
exact_matches = [mod for mod in target_modules if mod == key]
82
substring_matches = [mod for mod in target_modules if key in mod and mod != key]
83
ambiguous_key = key
0 commit comments