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
f90a5139
Commit
f90a5139
authored
Dec 06, 2023
by
Dhruv Nair
Browse files
fix
parent
a2bc2e14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
...diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
+3
-2
No files found.
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
View file @
f90a5139
...
...
@@ -446,8 +446,9 @@ def convert_ldm_unet_checkpoint(
new_checkpoint
[
"add_embedding.linear_2.bias"
]
=
unet_state_dict
[
"label_emb.0.2.bias"
]
# Relevant to StableDiffusionUpscalePipeline
if
(
config
[
"num_class_embeds"
]
is
not
None
)
and
(
"label_emb.weight"
in
unet_state_dict
):
new_checkpoint
[
"class_embedding.weight"
]
=
unet_state_dict
[
"label_emb.weight"
]
if
"num_class_embeds"
in
config
:
if
(
config
[
"num_class_embeds"
]
is
not
None
)
and
(
"label_emb.weight"
in
unet_state_dict
):
new_checkpoint
[
"class_embedding.weight"
]
=
unet_state_dict
[
"label_emb.weight"
]
new_checkpoint
[
"conv_in.weight"
]
=
unet_state_dict
[
"input_blocks.0.0.weight"
]
new_checkpoint
[
"conv_in.bias"
]
=
unet_state_dict
[
"input_blocks.0.0.bias"
]
...
...
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