Skip to content

Commit 1c1ccaa

Browse files
Gothossayakpaul
andauthored
Xlabs lora fix (#9348)
* Fix ```from_single_file``` for xl_inpaint * Add basic flux inpaint pipeline * style, quality, stray print * Fix stray changes * Add inpainting model support * Change lora conversion for xlabs * Fix stray changes * Apply suggestions from code review * style --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 007ad0e commit 1c1ccaa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/diffusers/loaders/lora_conversion_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ def handle_qkv(sds_sd, ait_sd, sds_key, ait_keys, dims=None):
562562
new_key += ".attn.to_out.0"
563563
elif "processor.proj_lora2" in old_key:
564564
new_key += ".attn.to_add_out"
565-
elif "processor.qkv_lora1" in old_key and "up" not in old_key:
565+
# Handle text latents.
566+
elif "processor.qkv_lora2" in old_key and "up" not in old_key:
566567
handle_qkv(
567568
old_state_dict,
568569
new_state_dict,
@@ -574,7 +575,8 @@ def handle_qkv(sds_sd, ait_sd, sds_key, ait_keys, dims=None):
574575
],
575576
)
576577
# continue
577-
elif "processor.qkv_lora2" in old_key and "up" not in old_key:
578+
# Handle image latents.
579+
elif "processor.qkv_lora1" in old_key and "up" not in old_key:
578580
handle_qkv(
579581
old_state_dict,
580582
new_state_dict,

0 commit comments

Comments
 (0)