Skip to content

Commit 98cda21

Browse files
committed
fix pe bug for Sana
1 parent 4b9f1c7 commit 98cda21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/transformers/sana_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@ def __init__(
250250
inner_dim = num_attention_heads * attention_head_dim
251251

252252
# 1. Patch Embedding
253-
interpolation_scale = interpolation_scale if interpolation_scale is not None else max(sample_size // 64, 1)
254253
self.patch_embed = PatchEmbed(
255254
height=sample_size,
256255
width=sample_size,
257256
patch_size=patch_size,
258257
in_channels=in_channels,
259258
embed_dim=inner_dim,
260259
interpolation_scale=interpolation_scale,
260+
pos_embed_type="sincos" if interpolation_scale is not None else None,
261261
)
262262

263263
# 2. Additional condition embeddings

0 commit comments

Comments
 (0)