From 9147c4c954fd82aeed5146c7a4c304de03e646b2 Mon Sep 17 00:00:00 2001 From: Katsuya Date: Thu, 12 Jan 2023 13:55:40 -0500 Subject: [PATCH] Fix unused upcast_attn flag in convert_original_stable_diffusion_to_diffusers script (#1942) Fix unused upcast_attn flag in sd to diffusers script --- scripts/convert_original_stable_diffusion_to_diffusers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/convert_original_stable_diffusion_to_diffusers.py b/scripts/convert_original_stable_diffusion_to_diffusers.py index c8893314..69c90444 100644 --- a/scripts/convert_original_stable_diffusion_to_diffusers.py +++ b/scripts/convert_original_stable_diffusion_to_diffusers.py @@ -840,7 +840,7 @@ if __name__ == "__main__": ), ) parser.add_argument( - "--upcast_attn", + "--upcast_attention", default=False, type=bool, help=( @@ -871,7 +871,7 @@ if __name__ == "__main__": if "state_dict" in checkpoint: checkpoint = checkpoint["state_dict"] - upcast_attention = False + upcast_attention = args.upcast_attention if args.original_config_file is None: key_name = "model.diffusion_model.input_blocks.2.1.transformer_blocks.0.attn2.to_k.weight"