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.
2 parents 489da5d + decfa3c commit 8072fbaCopy full SHA for 8072fba
src/diffusers/loaders/peft.py
@@ -293,7 +293,7 @@ def map_state_dict_for_hotswap(sd):
293
# For hotswapping, we need the adapter name to be present in the state dict keys
294
new_sd = {}
295
for k, v in sd.items():
296
- if k.endswith("lora_A.weight") or key.endswith("lora_B.weight"):
+ if k.endswith("lora_A.weight") or k.endswith("lora_B.weight"):
297
k = k[: -len(".weight")] + f".{adapter_name}.weight"
298
elif k.endswith("lora_B.bias"): # lora_bias=True option
299
k = k[: -len(".bias")] + f".{adapter_name}.bias"
0 commit comments