[Bug] [Diffusion] Hybrid SP+TP does not work correctly for the I2V models
Checklist
- I searched related issues but found no solution.
- The bug persists in the latest version.
- Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
- If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
- Please use English. Otherwise, it will be closed.
Describe the bug
PR with fix in progress.
Wan VAE parallel encoding uses the SP group to partition the conditioning image, but its spatial-parallel operators and reconstruction helpers are coupled to the VAE decode-parallel group. In hybrid TP×SP configurations those groups have different sizes and rank layouts, causing incorrect spatial neighborhoods and duplicated/misordered conditioning latents.
Current result:
https://github.com/user-attachments/assets/7f223f2e-48e1-443d-8a69-2d8c576ffd22
Expected result:
https://github.com/user-attachments/assets/6d00be07-c70a-487c-a3af-4df5c4e2e0ce
Reproduction
SGLANG_CACHE_DIT_FN=2 SGLANG_CACHE_DIT_BN=1 SGLANG_CACHE_DIT_WARMUP=4 SGLANG_CACHE_DIT_RDT=0.4 SGLANG_CACHE_DIT_MC=4 SGLANG_CACHE_DIT_TAYLORSEER=true SGLANG_CACHE_DIT_TS_ORDER=2 SGLANG_CACHE_DIT_ENABLED=true sglang generate --model-path ./Wan-AI/Wan2.2-I2V-A14B-Diffusers --sp-degree 2 --tp-size 2 --num-gpus 4 --attention-backend fa --port 30087 --num-frames 61 --num-inference-steps 35 --dit-cpu-offload false --prompt "视频画面呈现为一个室外体育场的红色塑胶跑道,一位男性跑步者正沿白色标线快速奔跑。 他身穿白色无袖运动背 心和黑色紧身运动短裤,脚上是荧光绿色的专业跑鞋。镜头采用低角度跟拍视角,紧随其后,初始为中景,捕捉到他全身协调的跑动姿态,手臂有力地前后摆动,身体微微前倾。随后,镜头切换为腿部特写,聚焦于他大腿和小 腿 上因发力而紧绷隆起的肌肉线条,汗珠在白天的自然光下顺着皮肤滑落。跑道地面快速向后掠过,浅景深效果使背景的看台和远处的蓝天变得模糊,进一步凸显了奔跑的速度感和力量感,整个过程中镜头始终保持平稳的跟拍运动。" --image-path "runner.jpg"
Environment
Standart NPU environment
Source: sgl-project/sglang