Skip to content

WAN-video: support training with batch size > 1 #583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hnyu
Copy link

@hnyu hnyu commented May 22, 2025

Currently, if we want to set batch size > 1 for finetuning WAN, there will be dim0 size mismatch at

x = torch.cat([x, y], dim=1)  # (b, c_x + c_y, f, h, w)

in wan_video_dit.py. The reason is that the code is hardcoded to assume batch_size=1 when processing "context", "clip_feature" and "y" in training_step() of train_wan_t2v.py. We should actually use squeeze(1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant