mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-12-15 19:53:22 +00:00
Implements a production-grade testing infrastructure with 100+ tests covering all core modules and pipelines. Test Coverage: - Unit tests for WanModel (DiT architecture) - Unit tests for WanVAE (3D Causal VAE) - Unit tests for attention mechanisms - Integration tests for pipelines (T2V, I2V, FLF2V, VACE) - Utility function tests Test Infrastructure: - conftest.py with reusable fixtures for configs, devices, and dtypes - pytest.ini with markers for different test categories - Test markers: slow, cuda, integration, unit, requires_model - Support for both CPU and GPU testing - Parameterized tests for various configurations Files Added: - tests/conftest.py - Pytest fixtures and configuration - tests/test_attention.py - Attention mechanism tests - tests/test_model.py - WanModel tests - tests/test_vae.py - VAE tests - tests/test_utils.py - Utility function tests - tests/test_pipelines.py - Pipeline integration tests - pytest.ini - Pytest configuration Test Execution: - pytest tests/ -v # Run all tests - pytest tests/ -m "not cuda" # CPU only - pytest tests/ -m "integration" # Integration tests only |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| README.md | ||
| test_attention.py | ||
| test_model.py | ||
| test_pipelines.py | ||
| test_utils.py | ||
| test_vae.py | ||
| test.sh | ||
Put all your models (Wan2.1-T2V-1.3B, Wan2.1-T2V-14B, Wan2.1-I2V-14B-480P, Wan2.1-I2V-14B-720P) in a folder and specify the max GPU number you want to use.
bash ./test.sh <local model dir> <gpu number>