Skip to content

Commit 17edc43

Browse files
committed
bug fix
1 parent a990c1c commit 17edc43

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/diffusers/loaders/single_file_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,10 +2894,10 @@ def convert_sana_transformer_to_diffusers(checkpoint, **kwargs):
28942894

28952895
# Caption Projection.
28962896
checkpoint.pop("y_embedder.y_embedding")
2897-
converted_state_dict["caption_proj.linear_1.weight"] = checkpoint.pop("y_embedder.y_proj.fc1.weight")
2898-
converted_state_dict["caption_proj.linear_1.bias"] = checkpoint.pop("y_embedder.y_proj.fc1.bias")
2899-
converted_state_dict["caption_proj.linear_2.weight"] = checkpoint.pop("y_embedder.y_proj.fc2.weight")
2900-
converted_state_dict["caption_proj.linear_2.bias"] = checkpoint.pop("y_embedder.y_proj.fc2.bias")
2897+
converted_state_dict["caption_projection.linear_1.weight"] = checkpoint.pop("y_embedder.y_proj.fc1.weight")
2898+
converted_state_dict["caption_projection.linear_1.bias"] = checkpoint.pop("y_embedder.y_proj.fc1.bias")
2899+
converted_state_dict["caption_projection.linear_2.weight"] = checkpoint.pop("y_embedder.y_proj.fc2.weight")
2900+
converted_state_dict["caption_projection.linear_2.bias"] = checkpoint.pop("y_embedder.y_proj.fc2.bias")
29012901
converted_state_dict["caption_norm.weight"] = checkpoint.pop("attention_y_norm.weight")
29022902

29032903

tests/single_file/test_sana_transformer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import gc
22
import unittest
33

4-
import torch
5-
64
from diffusers import (
75
SanaTransformer2DModel,
86
)

0 commit comments

Comments
 (0)