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: