Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
7de51b82
Unverified
Commit
7de51b82
authored
Dec 05, 2025
by
Sayak Paul
Committed by
GitHub
Dec 04, 2025
Browse files
[lora] support more ZImage LoRAs (#12790)
up Co-authored-by:
Álvaro Somoza
<
asomoza@users.noreply.github.com
>
parent
cd00ba68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/diffusers/loaders/lora_conversion_utils.py
src/diffusers/loaders/lora_conversion_utils.py
+11
-0
No files found.
src/diffusers/loaders/lora_conversion_utils.py
View file @
7de51b82
...
@@ -2417,6 +2417,17 @@ def _convert_non_diffusers_z_image_lora_to_diffusers(state_dict):
...
@@ -2417,6 +2417,17 @@ def _convert_non_diffusers_z_image_lora_to_diffusers(state_dict):
state_dict
=
{
convert_key
(
k
):
v
for
k
,
v
in
state_dict
.
items
()}
state_dict
=
{
convert_key
(
k
):
v
for
k
,
v
in
state_dict
.
items
()}
def
normalize_out_key
(
k
:
str
)
->
str
:
if
".to_out"
in
k
:
return
k
return
re
.
sub
(
r
"\.out(?=\.(?:lora_down|lora_up)\.weight$|\.alpha$)"
,
".to_out.0"
,
k
,
)
state_dict
=
{
normalize_out_key
(
k
):
v
for
k
,
v
in
state_dict
.
items
()}
has_default
=
any
(
"default."
in
k
for
k
in
state_dict
)
has_default
=
any
(
"default."
in
k
for
k
in
state_dict
)
if
has_default
:
if
has_default
:
state_dict
=
{
k
.
replace
(
"default."
,
""
):
v
for
k
,
v
in
state_dict
.
items
()}
state_dict
=
{
k
.
replace
(
"default."
,
""
):
v
for
k
,
v
in
state_dict
.
items
()}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment