We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbd3572 commit 4c05f78Copy full SHA for 4c05f78
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
@@ -446,7 +446,7 @@ def convert_ldm_unet_checkpoint(
446
new_checkpoint["add_embedding.linear_2.bias"] = unet_state_dict["label_emb.0.2.bias"]
447
448
# Relevant to StableDiffusionUpscalePipeline
449
- if "num_class_embeds" in config:
+ if (config["num_class_embeds"] is not None) and ("label_emb.weight" in unet_state_dict):
450
new_checkpoint["class_embedding.weight"] = unet_state_dict["label_emb.weight"]
451
452
new_checkpoint["conv_in.weight"] = unet_state_dict["input_blocks.0.0.weight"]
0 commit comments