Compare commits

...
Author SHA1 Message Date
SolitaryThinker f18901b00b wip 2025-09-28 05:42:34 +00:00
64 changed files with 72 additions and 48 deletions
+19 -5
View File
@@ -18,7 +18,8 @@ steps:
- path:
- "fastvideo/models/encoders/**"
- "fastvideo/models/loader/**"
- "fastvideo/tests/encoders/**"
- "tests/encoders/**"
- "tests/utils.py"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -31,7 +32,8 @@ steps:
- path:
- "fastvideo/models/vaes/**"
- "fastvideo/models/loader/**"
- "fastvideo/tests/vaes/**"
- "tests/vaes/**"
- "tests/utils.py"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -44,7 +46,8 @@ steps:
- path:
- "fastvideo/models/dits/**"
- "fastvideo/models/loader/**"
- "fastvideo/tests/transformers/**"
- "tests/transformers/**"
- "tests/utils.py"
- "fastvideo/layers/**"
- "fastvideo/attention/**"
- "pyproject.toml"
@@ -58,6 +61,8 @@ steps:
queue: "default"
- path:
- "fastvideo/**/*.py"
- "tests/ssim/**"
- "tests/utils.py"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -68,9 +73,10 @@ steps:
agents:
queue: "default"
- path:
- "fastvideo/tests/lora/**"
- "tests/inference/lora/**"
- "fastvideo/models/loader/**"
- "fastvideo/tests/transformers/**"
- "tests/transformers/**"
- "tests/utils.py"
- "fastvideo/pipelines/**"
- "fastvideo/layers/lora/**"
- "pyproject.toml"
@@ -84,6 +90,7 @@ steps:
queue: "default"
- path:
- "fastvideo/**"
- "tests/training/Vanilla/**"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -95,6 +102,7 @@ steps:
queue: "default"
- path:
- "fastvideo/training/*distillation_pipeline.py"
- "tests/training/distill/**"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -106,6 +114,7 @@ steps:
queue: "default"
- path:
- "fastvideo/**"
- "tests/training/lora/**"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -117,6 +126,7 @@ steps:
queue: "default"
- path:
- "fastvideo/**"
- "tests/training/VSA/**"
- "csrc/attn/video_sparse_attn/**"
- "csrc/attn/video_sparse_attn/tk/**"
- "csrc/attn/video_sparse_attn/setup.py"
@@ -133,6 +143,7 @@ steps:
queue: "default"
- path:
- "fastvideo/**"
- "tests/inference/STA/**"
- "csrc/attn/sliding_tile_attn/**"
- "csrc/attn/sliding_tile_attn/setup.py"
- "csrc/attn/sliding_tile_attn/config_sta.py"
@@ -190,6 +201,7 @@ steps:
- path:
- "csrc/attn/vmoba_attn/vmoba/**"
- "fastvideo/attention/backends/vmoba.py"
- "tests/inference/vmoba/**"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
@@ -201,6 +213,8 @@ steps:
queue: "default"
- path:
- "fastvideo/**"
- "tests/dataset/**"
- "tests/workflow/**"
- "pyproject.toml"
- "docker/Dockerfile.python3.12"
config:
+1 -1
View File
@@ -50,7 +50,7 @@ else
exit 1
fi
MODAL_TEST_FILE="fastvideo/tests/modal/pr_test.py"
MODAL_TEST_FILE="tests/modal/pr_test.py"
if [ -z "${TEST_TYPE:-}" ]; then
log "Error: TEST_TYPE environment variable is not set"
+19 -11
View File
@@ -127,29 +127,35 @@ jobs:
encoder-test:
- 'fastvideo/models/encoders/**'
- 'fastvideo/models/loader/**'
- 'fastvideo/tests/encoders/**'
- 'tests/encoders/**'
- 'tests/utils.py'
- *common-paths
vae-test:
- 'fastvideo/models/vaes/**'
- 'fastvideo/models/loader/**'
- 'fastvideo/tests/vaes/**'
- 'tests/vaes/**'
- 'tests/utils.py'
- *common-paths
transformer-test:
- 'fastvideo/models/dits/**'
- 'fastvideo/models/loader/**'
- 'fastvideo/tests/transformers/**'
- 'tests/transformers/**'
- 'tests/utils.py'
- 'fastvideo/layers/**'
- 'fastvideo/attention/**'
- *common-paths
training-test:
- 'fastvideo/**'
- 'tests/training/Vanilla/**'
- *common-paths
training-test-VSA:
- 'fastvideo/**'
- 'tests/training/VSA/**'
- *common-paths
- *vsa-kernel-paths
inference-test-STA:
- 'fastvideo/**'
- 'tests/inference/STA/**'
- *common-paths
- *sta-kernel-paths
precision-test-STA:
@@ -160,6 +166,8 @@ jobs:
- *vsa-kernel-paths
unit-test:
- 'fastvideo/**'
- 'tests/dataset/**'
- 'tests/workflow/**'
- *common-paths
encoder-test:
@@ -174,7 +182,7 @@ jobs:
gpu_count: 1
volume_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "uv pip install -e .[test] && pytest ./fastvideo/tests/encoders -s"
test_command: "uv pip install -e .[test] && pytest ./tests/encoders -s"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -192,7 +200,7 @@ jobs:
gpu_count: 1
volume_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "uv pip install -e .[test] && pytest ./fastvideo/tests/vaes -s"
test_command: "uv pip install -e .[test] && pytest ./tests/vaes -s"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -210,7 +218,7 @@ jobs:
gpu_count: 1
volume_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "uv pip install -e .[test] && pytest ./fastvideo/tests/transformers -s"
test_command: "uv pip install -e .[test] && pytest ./tests/transformers -s"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -236,7 +244,7 @@ jobs:
volume_size: 200
disk_size: 200
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:${{ matrix.python-version.tag }}"
test_command: "uv pip install -e .[test] && pytest ./fastvideo/tests/ssim -vs"
test_command: "uv pip install -e .[test] && pytest ./tests/ssim -vs"
timeout_minutes: 60
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -255,7 +263,7 @@ jobs:
volume_size: 100
disk_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./fastvideo/tests/training/Vanilla -srP"
test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./tests/training/Vanilla -srP"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -275,7 +283,7 @@ jobs:
volume_size: 100
disk_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./fastvideo/tests/training/VSA -srP"
test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./tests/training/VSA -srP"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -295,7 +303,7 @@ jobs:
volume_size: 100
disk_size: 100
image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
test_command: "uv pip install -e .[test] && pytest ./fastvideo/tests/inference/STA -srP"
test_command: "uv pip install -e .[test] && pytest ./tests/inference/STA -srP"
timeout_minutes: 30
secrets:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -369,7 +377,7 @@ jobs:
# volume_size: 100
# disk_size: 100
# image: "ghcr.io/${{ github.repository }}/fastvideo-dev:py3.12-latest"
# test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./fastvideo/tests/nightly/test_e2e_overfit_single_sample.py -vs"
# test_command: "wandb login $WANDB_API_KEY && uv pip install -e .[test] && pytest ./tests/nightly/test_e2e_overfit_single_sample.py -vs"
# timeout_minutes: 30
# secrets:
# RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
@@ -6,7 +6,7 @@ import pytest
from fastvideo import VideoGenerator
from fastvideo.logger import init_logger
from fastvideo.tests.utils import compute_video_ssim_torchvision, write_ssim_results
from tests.utils import compute_video_ssim_torchvision, write_ssim_results
from diffusers import DiffusionPipeline
from fastvideo.fastvideo_args import FastVideoArgs
from fastvideo.pipelines import build_pipeline
@@ -192,4 +192,3 @@ def test_lora_inference_similarity(ATTENTION_BACKEND, model_id):
@@ -64,35 +64,35 @@ def run_test(pytest_command: str):
@app.function(gpu="L40S:1", image=image, timeout=900)
def run_encoder_tests():
run_test("pytest ./fastvideo/tests/encoders -vs")
run_test("pytest ./tests/encoders -vs")
@app.function(gpu="L40S:1", image=image, timeout=900)
def run_vae_tests():
run_test("pytest ./fastvideo/tests/vaes -vs")
run_test("pytest ./tests/vaes -vs")
@app.function(gpu="L40S:1", image=image, timeout=900)
def run_transformer_tests():
run_test("pytest ./fastvideo/tests/transformers -vs")
run_test("pytest ./tests/transformers -vs")
@app.function(gpu="L40S:2", image=image, timeout=2700)
def run_ssim_tests():
run_test("pytest ./fastvideo/tests/ssim -vs")
run_test("pytest ./tests/ssim -vs")
@app.function(gpu="L40S:4", image=image, timeout=900, secrets=[modal.Secret.from_dict({"WANDB_API_KEY": os.environ.get("WANDB_API_KEY", "")})])
def run_training_tests():
run_test("wandb login $WANDB_API_KEY && pytest ./fastvideo/tests/training/Vanilla -srP")
run_test("wandb login $WANDB_API_KEY && pytest ./tests/training/Vanilla -srP")
@app.function(gpu="L40S:2", image=image, timeout=900, secrets=[modal.Secret.from_dict({"WANDB_API_KEY": os.environ.get("WANDB_API_KEY", "")})])
def run_training_lora_tests():
run_test("wandb login $WANDB_API_KEY && pytest ./fastvideo/tests/training/lora/test_lora_training.py -srP")
run_test("wandb login $WANDB_API_KEY && pytest ./tests/training/lora/test_lora_training.py -srP")
@app.function(gpu="H100:2", image=image, timeout=900, secrets=[modal.Secret.from_dict({"WANDB_API_KEY": os.environ.get("WANDB_API_KEY", "")})])
def run_training_tests_VSA():
run_test("wandb login $WANDB_API_KEY && pytest ./fastvideo/tests/training/VSA -srP")
run_test("wandb login $WANDB_API_KEY && pytest ./tests/training/VSA -srP")
@app.function(gpu="H100:2", image=image, timeout=900)
def run_inference_tests_STA():
run_test("pytest ./fastvideo/tests/inference/STA -srP")
run_test("pytest ./tests/inference/STA -srP")
@app.function(gpu="H100:1", image=image, timeout=900)
def run_precision_tests_STA():
@@ -108,16 +108,16 @@ def run_precision_tests_vmoba():
@app.function(gpu="L40S:1", image=image, timeout=900)
def run_inference_tests_vmoba():
run_test('python fastvideo/tests/inference/vmoba/test_vmoba_inference.py')
run_test('python tests/inference/vmoba/test_vmoba_inference.py')
@app.function(gpu="L40S:1", image=image, timeout=3600)
def run_inference_lora_tests():
run_test("pytest ./fastvideo/tests/inference/lora/test_lora_inference_similarity.py -vs")
run_test("pytest ./tests/inference/lora/test_lora_inference_similarity.py -vs")
@app.function(gpu="L40S:2", image=image, timeout=900)
def run_distill_dmd_tests():
run_test("pytest ./fastvideo/tests/training/distill/test_distill_dmd.py -vs")
run_test("pytest ./tests/training/distill/test_distill_dmd.py -vs")
@app.function(gpu="L40S:1", image=image, timeout=900)
def run_unit_test():
run_test("pytest ./fastvideo/tests/dataset/ ./fastvideo/tests/workflow/ -vs")
run_test("pytest ./tests/dataset/ ./tests/workflow/ -vs")
@@ -3,7 +3,7 @@ from pathlib import Path
from huggingface_hub import snapshot_download
import subprocess
import sys
from fastvideo.tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
from tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
import shutil
# Import the training pipeline
@@ -181,4 +181,4 @@ def test_e2e_overfit_single_sample():
if __name__ == "__main__":
test_e2e_overfit_single_sample()
test_e2e_overfit_single_sample()
@@ -4,7 +4,7 @@ from huggingface_hub import snapshot_download
import shutil
import subprocess
import sys
from fastvideo.tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
from tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
# Import the training pipeline
sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent))
@@ -169,4 +169,4 @@ def test_e2e_overfit_single_sample():
if __name__ == "__main__":
test_e2e_overfit_single_sample()
test_e2e_overfit_single_sample()
@@ -4,7 +4,7 @@ from huggingface_hub import snapshot_download
import shutil
import subprocess
import sys
from fastvideo.tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
from tests.ssim.test_inference_similarity import compute_video_ssim_torchvision
# Import the training pipeline
sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent))
@@ -174,4 +174,4 @@ def test_e2e_overfit_single_sample():
if __name__ == "__main__":
test_e2e_overfit_single_sample()
test_e2e_overfit_single_sample()
@@ -10,10 +10,10 @@ torchrun --standalone --nnodes=1 --nproc_per_node=$num_gpus \
num_gpus=2
torchrun --standalone --nnodes=1 --nproc_per_node=$num_gpus \
--master_port 29503 \
fastvideo/tests/test_hunyuanvideo_load.py --sequence_model_parallel_size $num_gpus
tests/test_hunyuanvideo_load.py --sequence_model_parallel_size $num_gpus
torchrun --nnodes=1 --nproc_per_node=1 --master_port 29503 fastvideo/tests/test_llama_encoder.py
torchrun --nnodes=1 --nproc_per_node=1 --master_port 29503 tests/test_llama_encoder.py
export FASTVIDEO_ATTENTION_BACKEND=FLASH_ATTN
torchrun --nnodes=1 --nproc_per_node=1 --master_port 29503 fastvideo/tests/test_clip_encoder.py
torchrun --nnodes=1 --nproc_per_node=1 --master_port 29503 tests/test_clip_encoder.py
@@ -2,7 +2,7 @@ The reference videos in the `*_reference_videos` directory are used as part of a
`A40_reference_videos` are generated on A40s and so on.
run `bash update_reference_videos.sh` from inside the `fastvideo/tests/ssim/` directory after running `test_inference_similarity.py` to update reference videos. Note: make sure to update the path to the corresponding device.
run `bash update_reference_videos.sh` from inside the `tests/ssim/` directory after running `test_inference_similarity.py` to update reference videos. Note: make sure to update the path to the corresponding device.
reference videos were generated on commit `4aeabbc629e0edf91477e80e795e7bb1823c71cb`
causal videos were generated on commit b318063c0a4618f1d5d99ea82ca67a06aad0d19d
@@ -7,7 +7,7 @@ import pytest
from fastvideo import VideoGenerator
from fastvideo.logger import init_logger
from fastvideo.tests.utils import compute_video_ssim_torchvision, write_ssim_results
from tests.utils import compute_video_ssim_torchvision, write_ssim_results
from fastvideo.worker.multiproc_executor import MultiprocExecutor
logger = init_logger(__name__)
@@ -7,7 +7,7 @@ import pytest
from fastvideo import VideoGenerator
from fastvideo.logger import init_logger
from fastvideo.tests.utils import compute_video_ssim_torchvision, write_ssim_results
from tests.utils import compute_video_ssim_torchvision, write_ssim_results
from fastvideo.worker.multiproc_executor import MultiprocExecutor
logger = init_logger(__name__)
@@ -12,7 +12,8 @@ from fastvideo.fastvideo_args import FastVideoArgs, TrainingArgs
from fastvideo.utils import FlexibleArgumentParser
wandb_name = "test_training_loss_VSA"
reference_wandb_summary_file = "fastvideo/tests/training/VSA/reference_wandb_summary_VSA.json"
_REFERENCE_DIR = Path(__file__).resolve().parent
reference_wandb_summary_file = str(_REFERENCE_DIR / "reference_wandb_summary_VSA.json")
NUM_NODES = "1"
NUM_GPUS_PER_NODE = "2"
@@ -16,8 +16,9 @@ from fastvideo.utils import FlexibleArgumentParser
from fastvideo.training.wan_training_pipeline import WanTrainingPipeline
wandb_name = "test_training_loss"
a40_reference_wandb_summary_file = "fastvideo/tests/training/Vanilla/a40_reference_wandb_summary.json"
l40s_reference_wandb_summary_file = "fastvideo/tests/training/Vanilla/l40s_reference_wandb_summary.json"
_REFERENCE_DIR = Path(__file__).resolve().parent
a40_reference_wandb_summary_file = str(_REFERENCE_DIR / "a40_reference_wandb_summary.json")
l40s_reference_wandb_summary_file = str(_REFERENCE_DIR / "l40s_reference_wandb_summary.json")
NUM_NODES = "1"
NUM_GPUS_PER_NODE = "2"
@@ -9,7 +9,8 @@ import json
from huggingface_hub import snapshot_download
wandb_name = "test_lora_training"
l40s_reference_wandb_summary_file = "fastvideo/tests/training/lora/l40s_reference_lora_wandb_summary.json"
_REFERENCE_DIR = Path(__file__).resolve().parent
l40s_reference_wandb_summary_file = str(_REFERENCE_DIR / "l40s_reference_lora_wandb_summary.json")
NUM_NODES = "1"
NUM_GPUS_PER_NODE = "2"
@@ -116,4 +117,4 @@ def test_lora_training():
if __name__ == "__main__":
test_lora_training()
test_lora_training()