Wan2.1/tests
Claude 67f00b6f47
test: add comprehensive pytest test suite
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
2025-11-19 04:24:33 +00:00
..
conftest.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
README.md init upload 2025-02-25 22:07:47 +08:00
test_attention.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
test_model.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
test_pipelines.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
test_utils.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
test_vae.py test: add comprehensive pytest test suite 2025-11-19 04:24:33 +00:00
test.sh [feature] Add VACE (#389) 2025-05-14 20:44:25 +08:00

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>