Skip to content

Commit cd730e7

Browse files
committed
support lightx2v lora in wan
1 parent 20e0740 commit cd730e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/diffusers/loaders/lora_conversion_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,10 @@ def _convert_non_diffusers_wan_lora_to_diffusers(state_dict):
19741974
converted_key = f"condition_embedder.image_embedder.{img_ours}.lora_B.weight"
19751975
if original_key in original_state_dict:
19761976
converted_state_dict[converted_key] = original_state_dict.pop(original_key)
1977+
bias_key_theirs = original_key.removesuffix(f".{lora_up_key}.weight") + ".diff_b"
1978+
if bias_key_theirs in original_state_dict:
1979+
bias_key = converted_key.removesuffix(".weight") + ".bias"
1980+
converted_state_dict[bias_key] = original_state_dict.pop(bias_key_theirs)
19771981

19781982
if len(original_state_dict) > 0:
19791983
diff = all(".diff" in k for k in original_state_dict)

0 commit comments

Comments
 (0)