Fix unused upcast_attn flag in convert_original_stable_diffusion_to_diffusers script (#1942)

Fix unused upcast_attn flag in sd to diffusers script
This commit is contained in:
Katsuya 2023-01-12 13:55:40 -05:00 committed by GitHub
parent 6d3adf6570
commit 9147c4c954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -840,7 +840,7 @@ if __name__ == "__main__":
), ),
) )
parser.add_argument( parser.add_argument(
"--upcast_attn", "--upcast_attention",
default=False, default=False,
type=bool, type=bool,
help=( help=(
@ -871,7 +871,7 @@ if __name__ == "__main__":
if "state_dict" in checkpoint: if "state_dict" in checkpoint:
checkpoint = checkpoint["state_dict"] checkpoint = checkpoint["state_dict"]
upcast_attention = False upcast_attention = args.upcast_attention
if args.original_config_file is None: if args.original_config_file is None:
key_name = "model.diffusion_model.input_blocks.2.1.transformer_blocks.0.attn2.to_k.weight" key_name = "model.diffusion_model.input_blocks.2.1.transformer_blocks.0.attn2.to_k.weight"