Skip to content

Commit 9147c4c

Browse files
authored
Fix unused upcast_attn flag in convert_original_stable_diffusion_to_diffusers script (huggingface#1942)
Fix unused upcast_attn flag in sd to diffusers script
1 parent 6d3adf6 commit 9147c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/convert_original_stable_diffusion_to_diffusers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def convert_open_clip_checkpoint(checkpoint):
840840
),
841841
)
842842
parser.add_argument(
843-
"--upcast_attn",
843+
"--upcast_attention",
844844
default=False,
845845
type=bool,
846846
help=(
@@ -871,7 +871,7 @@ def convert_open_clip_checkpoint(checkpoint):
871871
if "state_dict" in checkpoint:
872872
checkpoint = checkpoint["state_dict"]
873873

874-
upcast_attention = False
874+
upcast_attention = args.upcast_attention
875875
if args.original_config_file is None:
876876
key_name = "model.diffusion_model.input_blocks.2.1.transformer_blocks.0.attn2.to_k.weight"
877877

0 commit comments

Comments
 (0)