From 7afd751915cd43511390679e6c3e7ca4e554f529 Mon Sep 17 00:00:00 2001 From: SolitaryThinker Date: Tue, 21 Jul 2026 21:01:52 -0700 Subject: [PATCH] [test]: isolate LTX SP subprocess imports --- fastvideo/tests/distributed/test_sp_ltx2.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fastvideo/tests/distributed/test_sp_ltx2.py b/fastvideo/tests/distributed/test_sp_ltx2.py index 26ba81e3b..890267efd 100644 --- a/fastvideo/tests/distributed/test_sp_ltx2.py +++ b/fastvideo/tests/distributed/test_sp_ltx2.py @@ -247,6 +247,13 @@ def _run_torchrun( if pack_attention_projections: cmd.append("--pack-attention-projections") env = os.environ.copy() + repo_root = str(script_path.parents[3]) + inherited_pythonpath = env.get("PYTHONPATH") + env["PYTHONPATH"] = ( + repo_root + if not inherited_pythonpath + else os.pathsep.join((repo_root, inherited_pythonpath)) + ) env["FASTVIDEO_ATTENTION_BACKEND"] = "TORCH_SDPA" process = subprocess.run(cmd, capture_output=True, text=True, env=env) if process.returncode != 0: