From 1d2ea36678f27a7e36f4e94ae9fc817855924508 Mon Sep 17 00:00:00 2001 From: DN6 Date: Tue, 24 Jun 2025 08:29:18 +0530 Subject: [PATCH] update --- .github/workflows/nightly_tests.yml | 2 +- src/diffusers/utils/testing_utils.py | 4 ++++ tests/conftest.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly_tests.yml b/.github/workflows/nightly_tests.yml index 5476616704..6a6e92e52e 100644 --- a/.github/workflows/nightly_tests.yml +++ b/.github/workflows/nightly_tests.yml @@ -248,7 +248,7 @@ jobs: BIG_GPU_MEMORY: 40 run: | python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ - -m "big_gpu_with_torch_cuda" \ + -m "big_accelerator" \ --make-reports=tests_big_gpu_torch_cuda \ --report-log=tests_big_gpu_torch_cuda.log \ tests/ diff --git a/src/diffusers/utils/testing_utils.py b/src/diffusers/utils/testing_utils.py index e5da39c1d8..ebb3d70553 100644 --- a/src/diffusers/utils/testing_utils.py +++ b/src/diffusers/utils/testing_utils.py @@ -421,6 +421,10 @@ def require_big_accelerator(test_case): Decorator marking a test that requires a bigger hardware accelerator (24GB) for execution. Some example pipelines: Flux, SD3, Cog, etc. """ + import pytest + + test_case = pytest.mark.big_accelerator(test_case) + if not is_torch_available(): return unittest.skip("test requires PyTorch")(test_case) diff --git a/tests/conftest.py b/tests/conftest.py index 7e9c4e8f39..3237fb9c7b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,6 +30,10 @@ sys.path.insert(1, git_repo_path) warnings.simplefilter(action="ignore", category=FutureWarning) +def pytest_configure(config): + config.addinivalue_line("markers", "big_accelerator: marks tests as requiring big accelerator resources") + + def pytest_addoption(parser): from diffusers.utils.testing_utils import pytest_addoption_shared