"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "4a96c2e4ee13c4a7f33ee0dbf85848b125380e72"
Unverified Commit 4c05f785 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Ldm unet convert fix (#6038)

* fix

* fix ldm conversion

* fix linting
parent bbd35720
......@@ -446,7 +446,7 @@ def convert_ldm_unet_checkpoint(
new_checkpoint["add_embedding.linear_2.bias"] = unet_state_dict["label_emb.0.2.bias"]
# Relevant to StableDiffusionUpscalePipeline
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"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment