Skip to content

Commit 0ae3408

Browse files
committed
revert changes in get_peft_kwargs.
1 parent 5a2a023 commit 0ae3408

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/diffusers/utils/peft_utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,7 @@ def get_peft_kwargs(
152152
network_alpha_dict,
153153
peft_state_dict,
154154
is_unet=True,
155-
prefix=None,
156155
):
157-
from ..loaders.lora_base import LORA_ADAPTER_METADATA_KEY
158-
159-
if LORA_ADAPTER_METADATA_KEY in peft_state_dict:
160-
metadata = peft_state_dict[LORA_ADAPTER_METADATA_KEY]
161-
else:
162-
metadata = None
163-
if metadata:
164-
if prefix is not None:
165-
metadata = {k.removeprefix(f"{prefix}."): v for k, v in metadata.items() if k.startswith(f"{prefix}.")}
166-
return metadata
167-
168156
rank_pattern = {}
169157
alpha_pattern = {}
170158
r = lora_alpha = list(rank_dict.values())[0]

0 commit comments

Comments
 (0)