[Bugfix] Fix wan2.2 ti2v (#1221)

Signed-off-by: mxuax <mxuax@connect.ust.hk>
Signed-off-by: XU Mingshi <91017482+mxuax@users.noreply.github.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
XU MingshiandHongsheng Liu authored and GitHub committed 2026-02-06 17:28:49 +08:00
1 parent 285d71b26a
commit 11a5a914ca
2 files changed
+76 -14

No files matched your search

@@ -63,6 +63,11 @@ def sp_shard(
f"world_size ({world_size}) for sequence parallel sharding."
)
if size < world_size:
raise ValueError(
f"Tensor size along dim {dim} ({size}) must be >= world_size ({world_size}). Tensor shape: {tensor.shape}"
)
return tensor.chunk(world_size, dim=dim)[rank]