Skip to content

Commit 0fc1570

Browse files
authored
Add LyCoris LoKr MLP layer support for Flux2 (Comfy-Org#11997)
1 parent e755268 commit 0fc1570

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

comfy/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,14 @@ def flux_to_diffusers(mmdit_config, output_prefix=""):
611611
"ff_context.net.0.proj.bias": "txt_mlp.0.bias",
612612
"ff_context.net.2.weight": "txt_mlp.2.weight",
613613
"ff_context.net.2.bias": "txt_mlp.2.bias",
614+
"ff.linear_in.weight": "img_mlp.0.weight", # LyCoris LoKr
615+
"ff.linear_in.bias": "img_mlp.0.bias",
616+
"ff.linear_out.weight": "img_mlp.2.weight",
617+
"ff.linear_out.bias": "img_mlp.2.bias",
618+
"ff_context.linear_in.weight": "txt_mlp.0.weight",
619+
"ff_context.linear_in.bias": "txt_mlp.0.bias",
620+
"ff_context.linear_out.weight": "txt_mlp.2.weight",
621+
"ff_context.linear_out.bias": "txt_mlp.2.bias",
614622
"attn.norm_q.weight": "img_attn.norm.query_norm.scale",
615623
"attn.norm_k.weight": "img_attn.norm.key_norm.scale",
616624
"attn.norm_added_q.weight": "txt_attn.norm.query_norm.scale",

0 commit comments

Comments
 (0)