Spaces:
Running on Zero

techfreakworm commited on
Commit
e6b3ade
·
unverified ·
1 Parent(s): adad9b6

feat: real weights on MPS/CPU go to the local runner, chosen by the one device resolver; the tiny snapshot keeps the resident StageRunner

Browse files

On a resolved mps or cpu device with no LTX25_MODEL_SNAPSHOT_DIR override,
`pipelines.get_pipeline` returns `local_runtime.build_local_runner(...)` with:
- the workflow kind and the resolved device;
- the device's dtype (bf16 on MPS; fp32 by default on the CPU);
- the pinned snapshot directory;
- LTX25_TRANSFORMER_GGUF, an optional .gguf file checked at startup;
- LTX25_RESIDENCY, staged or resident (staged by default on macOS, resident elsewhere).
A snapshot override keeps the resident StageRunner the tiny tier uses, and CUDA
is untouched. An explicit device="mps" is checked against the MPS self-test
before the local runner is built, just as the resolved path is. The startup
report gains a runner line: StageRunner on CUDA or for an override; otherwise
the local runner, its residency, and whether the transformer comes from the
GGUF file or from the snapshot's safetensors.

pipelines imports local_runtime at module scope, which is safe because
local_runtime reads pipelines' attributes only at call time. So `import app`
loads local_runtime and memory, and both are registered as startup-only in the
reachability spec, as is device in the architecture and plan lists. That turns
test_no_package_module_is_reached_by_nothing green. A spec drives generate()
through its default factory on a resolved cpu device with a fake
build_local_runner and pins every argument of the call; others pin the MPS
arguments, the override path and the CUDA path.

8 files changed +293 -6
Files changed (8)
ltx25_studio/config.py+27
ltx25_studio/pipelines.py+56-3
tests/test_architecture.py+2
tests/test_config.py+30
tests/test_device_path.py+119-2
tests/test_module_reachability.py+8
tests/test_stage_graph_contract.py+1-1
tests/test_startup_report.py+50