"torchvision/vscode:/vscode.git/clone" did not exist on "f4c4d6cb3fd9c8ee538edc05f1e8a95951dbfd9e"
Unverified Commit 7ab7c121 authored by Junsong Chen's avatar Junsong Chen Committed by GitHub
Browse files

[Sana] 1k PE bug fixed (#10431)



fix pe bug for Sana
Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
parent 44640c83
......@@ -250,7 +250,6 @@ class SanaTransformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMixin):
inner_dim = num_attention_heads * attention_head_dim
# 1. Patch Embedding
interpolation_scale = interpolation_scale if interpolation_scale is not None else max(sample_size // 64, 1)
self.patch_embed = PatchEmbed(
height=sample_size,
width=sample_size,
......@@ -258,6 +257,7 @@ class SanaTransformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMixin):
in_channels=in_channels,
embed_dim=inner_dim,
interpolation_scale=interpolation_scale,
pos_embed_type="sincos" if interpolation_scale is not None else None,
)
# 2. Additional condition embeddings
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment