"vscode:/vscode.git/clone" did not exist on "96b57a9ad6447b95921b91e5f52fb3684f73514f"
Commit 37a86e46 authored by comfyanonymous's avatar comfyanonymous
Browse files

Remove duplicate text_projection key from some saved models.

parent 8daedc5b
......@@ -240,7 +240,7 @@ def convert_text_enc_state_dict_v20(text_enc_dict, prefix=""):
text_proj = "transformer.text_projection.weight"
if k.endswith(text_proj):
new_state_dict[k.replace(text_proj, "text_projection")] = v.transpose(0, 1).contiguous()
else:
relabelled_key = textenc_pattern.sub(lambda m: protected[re.escape(m.group(0))], k)
new_state_dict[relabelled_key] = v
......
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