From b16c6b0390bd6ed427f777c7c09e05033d21c15f Mon Sep 17 00:00:00 2001 From: Benjamin Berman Date: Fri, 19 Jul 2024 20:46:38 -0700 Subject: [PATCH] Tests only run in places where torchaudio is installed --- tests/inference/test_workflows.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/inference/test_workflows.py b/tests/inference/test_workflows.py index ac50a5def..13d27d0a4 100644 --- a/tests/inference/test_workflows.py +++ b/tests/inference/test_workflows.py @@ -448,6 +448,12 @@ async def test_workflow(workflow_name: str, workflow: dict, has_gpu: bool, clien if not has_gpu: pytest.skip("requires gpu") + if "audio" in workflow_name: + try: + import torchaudio + except (ImportError, ModuleNotFoundError): + pytest.skip("requires torchaudio") + prompt = Prompt.validate(workflow) add_known_models("loras", KNOWN_LORAS, CivitFile(13941, 16576, "epi_noiseoffset2.safetensors")) # todo: add all the models we want to test a bit more elegantly