Skip to content

[None][feat] Add FastWan2.2 TI2V-5B DMD pipeline (3-step text-to-video)#16162

Draft
Kambili wants to merge 2 commits into
NVIDIA:mainfrom
Kambili:fastwan22-support
Draft

[None][feat] Add FastWan2.2 TI2V-5B DMD pipeline (3-step text-to-video)#16162
Kambili wants to merge 2 commits into
NVIDIA:mainfrom
Kambili:fastwan22-support

Conversation

@Kambili

@Kambili Kambili commented Jul 9, 2026

Copy link
Copy Markdown

Description

Introduces FastWanPipeline for the FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers checkpoint — a CFG-free, DMD-distilled text-to-video model built on Wan 2.2 TI2V-5B.

FastWan shares Wan 2.2 TI2V-5B's architecture exactly; only the distilled weights and the sampling recipe differ. The pipeline therefore subclasses WanPipeline and overrides only the denoising loop, replacing the standard ~50-step diffusion with a 3-step DMD (Distribution Matching Distillation) schedule. This produces a 121×704×1280 video in ~3 denoising steps instead of ~50.

Text-to-video only: FastWan2.2-5B's released weights are DMD-distilled for T2V, so the pipeline raises NotImplementedError on image input.

Changes:

  • pipeline_fastwan.py: FastWanPipeline with the 3-step DMD denoising loop
  • wan/defaults.py, wan/__init__.py, models/__init__.py: registry wiring for the WanDMDPipeline class and the HF checkpoint ID
  • test_fastwan_dmd_math.py: unit tests for the DMD timestep math (stubbed transformer, no checkpoint)
  • test_fastwan_registry.py: unit tests for pipeline registration and default params
  • test_fastwan_pipeline.py: component accuracy tests (text encoder, VAE)
  • test_visual_gen.py: LPIPS regression test against a 121-frame golden reference
  • visual_gen_lpips_golden_media.zip: adds the 121-frame FastWan golden video
  • l0_b200.yml: registers the FastWan tests in CI

Test Coverage

  • test_fastwan_registry.py — verifies WanDMDPipeline resolves to FastWanPipeline, the HF ID is registered, defaults are correct (3 steps, CFG-free), and image input raises NotImplementedError. (No checkpoint; image input test requires GPU for the nvtx_range decorator.)
  • test_fastwan_dmd_math.py — verifies the DMD loop math with a stubbed transformer: sigma = t/1000 giving {1.0, 0.757, 0.522}, correct re-noising on intermediate steps, x0 kept on the final step, and output dtype.
  • test_fastwan_pipeline.py — component-level accuracy checks (text encoder, VAE).
  • test_visual_gen.py — end-to-end LPIPS regression: generates a 121-frame video with fixed settings and compares against the committed golden reference generated by FastVideo.
  • l0_b200.yml — all of the above registered to run in CI on B200.

@Kambili Kambili force-pushed the fastwan22-support branch 3 times, most recently from 037de6d to f37531e Compare July 9, 2026 03:50
Kambili added 2 commits July 9, 2026 04:19
… golden

Introduces FastWanPipeline for the FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers
checkpoint — a CFG-free DMD-distilled text+image-to-video model built on Wan 2.2.

Changes:
- pipeline_fastwan.py: FastWanPipeline with 3-step DMD denoising loop
- wan/defaults.py, wan/__init__.py, models/__init__.py: registry wiring
- test_fastwan_dmd_math.py: unit tests for DMD timestep math (no checkpoint)
- test_fastwan_registry.py: unit tests for pipeline registration and defaults
- test_fastwan_pipeline.py: component accuracy tests (text encoder, VAE)
- test_visual_gen.py: LPIPS regression test against 121-frame golden video
- visual_gen_lpips_golden_media.zip: updated with 121-frame FastWan golden
- l0_b200.yml: register all FastWan tests in CI

Signed-off-by: Nnamdi Wankwo <knwankwo@nvidia.com>
Signed-off-by: Kambili Nwankwo <67324523+Kambili@users.noreply.github.com>
Remove stray 'NVIDIA#112' prefix from the SPDX copyright line.

Signed-off-by: Nnamdi Wankwo <knwankwo@nvidia.com>
Signed-off-by: Kambili Nwankwo <67324523+Kambili@users.noreply.github.com>
@Kambili Kambili force-pushed the fastwan22-support branch from f37531e to 6e9eb69 Compare July 9, 2026 04:24
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