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
4c05f785
Unverified
Commit
4c05f785
authored
Dec 05, 2023
by
Dhruv Nair
Committed by
GitHub
Dec 05, 2023
Browse files
Ldm unet convert fix (#6038)
* fix * fix ldm conversion * fix linting
parent
bbd35720
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
...diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
+1
-1
No files found.
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
View file @
4c05f785
...
@@ -446,7 +446,7 @@ def convert_ldm_unet_checkpoint(
...
@@ -446,7 +446,7 @@ def convert_ldm_unet_checkpoint(
new_checkpoint
[
"add_embedding.linear_2.bias"
]
=
unet_state_dict
[
"label_emb.0.2.bias"
]
new_checkpoint
[
"add_embedding.linear_2.bias"
]
=
unet_state_dict
[
"label_emb.0.2.bias"
]
# Relevant to StableDiffusionUpscalePipeline
# Relevant to StableDiffusionUpscalePipeline
if
"num_class_embeds"
i
n
config
:
if
(
config
[
"num_class_embeds"
]
i
s
not
None
)
and
(
"label_emb.weight"
in
unet_state_dict
)
:
new_checkpoint
[
"class_embedding.weight"
]
=
unet_state_dict
[
"label_emb.weight"
]
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.weight"
]
=
unet_state_dict
[
"input_blocks.0.0.weight"
]
...
...
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