[test]: isolate LTX SP subprocess imports

This commit is contained in:
SolitaryThinker
2026-07-21 21:01:52 -07:00
parent cc5913e5c4
commit 7afd751915
@@ -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: