Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions wan/modules/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ def forward(

# time embeddings
if t.dim() == 1:
# Note: expand only works for dimensions of size 1; view(-1, 1) must be called first.
t = t.view(-1, 1).expand(t.size(0), seq_len)
elif t.dim() == 2 and t.size(1) == 1:
t = t.expand(t.size(0), seq_len)
with torch.amp.autocast('cuda', dtype=torch.float32):
bt = t.size(0)
Expand Down