Spaces:
Running on Zero
Running on Zero
Commit History
2 days ago
-
fix: no entry can sample on an MPS PyTorch that fails the numerics self-test: build_local_runner applies the app's gate on mps, so scripts/local_generate.py --device mps exits refused (2) before loading anything, and the remedy names the README's floor, PyTorch 2.14 (#11)
Unverified signaturetorch 2.11 on MPS reuses the first scale scaled-dot-product attention saw, which gives wrong numbers without any error. The app's pipeline factory refused such a build through device.require_mps_numerics, but local_runtime.build_local_runner never called it, and scripts/local_generate.py builds the runner directly: on an affected torch it would have produced a wrong video. build_local_runner now calls require_mps_numerics on mps, after the watermark and availability checks and before any file is looked at, so every entry is covered by one check; LTX25_MPS_SELF_TEST=warn still lets an operator run unverified. The script counts MpsNumericsError among its refusals (exit 2). MPS_CLEAN_TORCH said 2.15 while the README states PyTorch 2.14 or newer (2.14.1 measured the same as 2.15.0 in the numerics checks), so the refusal and the unverified note now say 2.14, as the README does. Tests: the script test begun on wip/deploy2-w14 (ca91f07), unchanged; a runner-level test under enforce and warn…444bc2b -
fix: a bad MPS watermark pair stops the app's MPS start in its own words before the numerics self-test runs, and every numerics gate checks the pair first, so it is never reported as a PyTorch that computes wrongly (#10)
Unverified signatureWith PYTORCH_MPS_HIGH_WATERMARK_RATIO below 1.4 and the low ratio unset, PyTorch's MPS allocator refuses the setting and every GPU operation fails, the self-test's first one too. `LTX25_DEVICE=mps python app.py` then logged a failed self-test at start-up and refused Generate with MpsNumericsError, which sends the user to a newer PyTorch; the pair is the cause. preflight.run now reads the pair before the self-test on mps. Under a pair PyTorch refuses, the self-test is not run, and the start (strict, as every MPS start of the app is) raises memory.MpsWatermarkError after the start-up report, like any other setting that cannot work on this machine; a report-only run logs the problem instead. device.require_mps_numerics checks the pair first as well, whatever LTX25_MPS_SELF_TEST says, so the Generate gate, the pipeline factory and the local runner refuse it in the same words. A start that does not use MPS is not affected. Tests: the F61 tests begun on wip/deploy2-w14 (ca91f07). The app t…e664ad9
3 days ago
-
fix: the generation-disabled message no longer says 70 GB either way, and a sound file given as the video is pinned as refused before dispatch
Unverified signatureFrom the audit of the backend review's findings (all 21 and the four call-site requests are fixed at HEAD), two small loose ends: - local-runtime-3's related note: GenerationDisabledError said the model needs roughly 70 GB of memory "either way", but the CPU's default 32-bit load is about twice the 16-bit one. It now says so, and names LTX25_CPU_DTYPE=bf16. - request-path-2 named a WAV given as the video among its triggers. It has been refused before dispatch since 85405e9 ("has no picture in it"), but no test pinned it; it is pinned now for video to video and video to audio.aacd299 -
fix: the local runner never restores a failed run's adapter, preflights a converting load at its real cost, and a real-sized snapshot override goes through it
Unverified signatureReview findings local-runtime-2 (= lora-1), -3, -4 and -6 (= lora-2). - A staged release captures the transformer's adapters to restore them after a reload. When the run then failed before the reload (a text-encoder preflight refusal, a load or encode error), generate()'s detach found the transformer released and deleted nothing, so the next run - with no LoRA asked for - generated through the old adapter. The staged pipeline's delete_adapters now also prunes the captured copy (as load_lora_weights is already guarded). - The first LoRA run on a fresh staged runner attaches (generate makes the transformer resident first since the run-record commit); pinned with a test through the real runner. - A converting load (fp32 or fp16 from the bf16 checkpoint) copies every tensor at the target size while the pages it read stay active until the move: the load preflights and the dry-run plan now promise file x spike x (target/stored) + the file pages, with the stored dtype rea…12a7ca3 -
fix: the app starts on mps/cpu with the GGUF layout: start-up checks what the local runner loads, not the Space's allow-list
Unverified signatureThe strict start-up check on mps/cpu demanded the Space's whole allow-list - the four safetensors transformer shards and the stage-2 parts - so the app could not start on a Mac holding the layout the local runner is built for (the small set, the text encoder and a GGUF transformer). It failed even earlier when LTX25_TRANSFORMER_GGUF pointed into the HF cache: the path was resolved to its extensionless blob before the .gguf check. - preflight.run, on mps/cpu with no snapshot override (where generation goes to the local runner), checks local_runtime.missing_files: the small set, the text encoder, and the safetensors transformer or the configured GGUF. Stage-2 files are optional there (stage 2 is refused at real sizes off CUDA). A missing file is LocalFilesMissingError with its download command. CUDA keeps the whole allow-list check unchanged. - config's GGUF check reads the name as given and keeps the link, so a snapshots/<rev>/x-Q8_0.gguf link into the HF cache is accepted.…dd7574c -
feat: real weights on MPS/CPU go to the local runner, chosen by the one device resolver; the tiny snapshot keeps the resident StageRunner
Unverified signatureOn 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 o…e6b3ade -
feat: one device resolver — CUDA on ZeroGPU, MPS/CPU by opt-in, and no silent 70 GB load anywhere else
Unverified signature`LTX25_DEVICE` = auto | cuda | mps | cpu, resolved once by `device.resolve()` and used by app.py, `pipelines.get_pipeline` and the stage-2 runner. `auto` is CUDA on ZeroGPU (answered from `spaces` alone, no CUDA probe in the web process) or on a CUDA host, and otherwise no generation device: the UI starts and Generate raises `GenerationDisabledError`, saying in plain words how to opt in, before any model or the enhancer is loaded. A Mac with the weights on disk used to build the whole pipeline on the CPU on the first click. The Space path is unchanged: the same module-scope build with `.to("cuda")`, the same int8 mapping and skip list, and the same static decorator. Defaults that work with no Space variable (F10): size xlarge (`auto` sent no size and got the 47.4 GiB `large` slice; ZeroGPU does not promote by itself), 180 s, quantisation `auto` = int8 on ZeroGPU and bf16 elsewhere. int8 on MPS/CPU is a startup ConfigError that says bitsandbytes has no kernels there. `zerogpu.partition…0ed2aa1