feat(diffusion): add LongLive WAN training path#4272
Conversation
Signed-off-by: Shuai Yang <shyang@nvidia.com>
Signed-off-by: Shuai Yang <shyang@nvidia.com>
|
Could you please check the default LongLive 1.3B recipe? It looks internally inconsistent: Please make the default recipe runnable, or mark it as non-runnable and update the README/tests accordingly. |
Signed-off-by: Shuai Yang <shyang@nvidia.com>
|
@yaoyu-33 can you review the latest version? |
Signed-off-by: Shuai Yang <shyang@nvidia.com>
Signed-off-by: Shuai Yang <shyang@nvidia.com>
Signed-off-by: Shuai Yang <shyang@nvidia.com>
|
Thanks for catching this. I updated the 1.3B recipe to use the supported CP=1 and qkv_format="sbhd" settings and documented it as a configuration template because the full sequence exceeds the current dense-mask limit. This PR primarily targets the LongLive 2.0 5B TP/SP path, so the README now includes avalidated reduced-resolution four-GPU smoke command using the recipe defaults (TP=4, SP enabled, and CP=1). All four TP ranks initialized successfully and completed one full training iteration. |
@yaoyu-33 Thanks for catching this. I updated the 1.3B recipe to use the supported CP=1 and qkv_format="sbhd" settings and documented it as a configuration template because the full sequence exceeds the current dense-mask limit. This PR primarily targets the LongLive 2.0 5B TP/SP path, so the README now includes avalidated reduced-resolution four-GPU smoke command using the recipe defaults (TP=4, SP enabled, and CP=1). All four TP ranks initialized successfully and completed one full training iteration. |
What does this PR do ?
Adds the initial offline-latents LongLive WAN MVP requested in #4215, covering clean-history plus noisy-target temporal chunks with windowed attention defaults and SP/TP validation.
Changelog
longlive_wan_stepregistration so WAN recipes can select the LongLive forward step fromscripts/training/run_recipe.py.LongLiveWanForwardStepandLongLiveWanFlowMatchingPipelinefor clean-history plus noisy-target temporal chunk training.[S, S]masks for long sequences.self_attention_mask.scripts/validation/wan_sp_tp_tiny_parity.pyto verify tiny WAN TP/SP inference parity with exact tensor equality.GitHub Actions CI
See the CI section in the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.
Before your PR is "Ready for review"
Pre checks:
Additional Information
pre-commit run --all-filespassed.python -m compileall -q scripts/validation/wan_sp_tp_tiny_parity.py src/megatron/bridge/diffusion/models/wan/longlive_wan_step.py src/megatron/bridge/diffusion/models/wan/longlive_wan_utils.py src/megatron/bridge/diffusion/models/wan/wan_model.py src/megatron/bridge/diffusion/recipes/wan/wan.py tests/unit_tests/diffusion/model/wan/test_longlive_wan_step.py tests/unit_tests/diffusion/recipes/wan/test_wan_recipe.pypassed.3244385: 35 passed, 26 warnings in 3.56s on 4x GB200.3244425:strict_equal=True,max_abs=0.00000000e+00.3244426: completed 1/1 iteration on 4x GB200 with 0 skipped and 0 NaN iterations.uvwas unavailable in the conda environment, so pre-commit was run directly after installingpre-commitinto the existingmb-longlive-wanenvironment.