Spaces:
Running on Zero
Running on Zero
Commit History
3 days ago
-
fix: bitsandbytes' int8 cast warning reaches the log once per process instead of once per matrix product, so the Space's log keeps its start-up report and its real warnings (#15)
Unverified signaturebitsandbytes 0.50.2 logs "MatMul8bitLt: inputs will be cast from torch.bfloat16 to float16 during quantization" (logger.warning on bitsandbytes.autograd._functions) on every int8 matrix product. On deploy 1 that was 55,400 of the last 55,534 lines of the Space's log after eleven runs, and the platform keeps only the tail, so the start-up report and every real warning were pushed out. A logging.Filter on that logger (ltx25_studio/log_filter.py) lets the message through once per process and drops its repeats. It is keyed by the process id and the rendered message, so a forked worker records the fact once for itself and a different dtype is a different line. Every other record on that logger passes, the logger's level stays NOTSET so bitsandbytes' other warnings still reach the log, and no other logger is touched. The filter is attached by the logger's name, so bitsandbytes is not imported: its own getLogger(__name__) returns the same object, filter included, whenever it loads. install()…18bcc7a
4 days ago
-
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
5 days ago
-
test: reachability, ZeroGPU wiring and frame-structure runs carry their mode's inputs
Unverified signatureThese helpers called generate() for a mode with nothing it requires: a text mode with no prompt, image_to_video with only a text shot row, and audio_to_audio with a path to a file that does not exist (the loader was stubbed, so nothing ever opened it). generate() is about to refuse all three before it reserves a GPU, which would leave these specs measuring the refusal rather than the paths they are about. The run helpers now pass conftest.inputs_for(mode), the audio probe passes a real WAV, and the shot rows become one keyframe -- an image at frame 8, strength 0.8 -- which reaches conditioning.py by the same route. Green with and without the scoping change, in both environments.f80c73b
-
fix: the enhancer's nine-minute wall — the rewrite moves onto the GPU it was priced for
Unverified signaturePrompt enhancement shipped in the web process, on the CPU, to stay out of ZeroGPU's packing window. The disk half of that argument was researched, checked against the packer's source, and is correct. The latency half was never measured. On the live Space, text_to_video at 256x256x9: enhance OFF 15.38 s enhance ON, cold 654.15 s (+638.8) enhance ON, warm 553.45 s (+538.1) The cold/warm split isolates it: the 2.46 GB fetch is 88 s and the weights load in under a second, so the download is not the cost. ~538 s is the CPU decode of 600 greedy tokens, about 0.9 s/token. The "1-2 s" that justified the CPU placement was a GPU number applied to a CPU placement — 600 tokens in 2 s is 300 tok/s, which no CPU does on a 5B-parameter model. "Where does it run" has two axes, disk and latency. One was optimised and the other was never measured. That is the transferable part and it is written into PLAN §3.5, UI_DESIGN and enhance.py rather than into this message alone…f967e30
-
test: a live module is not a live function
Unverified signatureCondition on the previous commit: the reachability sweep exists to catch an importer count of zero and it did not catch this one. Two reasons, both closed. The tracer recorded co_filename and DISCARDED co_name -- the resolution was thrown away, not missing; the function name was in the same frame object. audio.py runs on every audio-exporting mode via export_sampling_rate_from, so the file was always 'reached' while encode_waveform_to_latents inside it was dead. Four earlier blockers were dead MODULES, which the file-level check catches. This was a dead function in a live module, which it cannot. And the probe drove one mode. The audio-input path is reachable from no other mode, so a probe running only image_to_video was blind to it however fine the granularity. Either fix alone would still have missed this. CONTRACT_FUNCTIONS names the functions that ARE the path they belong to, each with the consequence of it not running, so a failure reads as what breaks rather than as a name tha…ac4cd87 -
fix(test): a ui/-only import is not reachability for business logic
Unverified signatureThe orphan assertion counted any module in sys.modules after `import app` as reached. That is precisely the laundering blocker #4 used: conditioning.py sat in sys.modules the whole time it was dead, because ui/handlers.py imported it for a live readout. It was used everywhere except where it mattered. Proven silent, not argued: a new non-UI module imported only by ui/handlers.py passed all 28 assertions. Blocker #4's own shape was caught only by the targeted test hand-written for that one module, which means the general property was never holding and instance coverage was being read as class coverage. Non-ui/ modules must now be reached by the generation path itself. Only ui/ modules and a documented STARTUP_ONLY set may qualify on being merely loaded, and that set is measured rather than assumed: six modules, each carrying the reason it never runs during a generation. errors.py executes only when something raises, and a successful run raises nothing. Detection strictly improves. Th…5d7cf85 -
fix(test): measure reachability in a clean interpreter, not mid-suite
Unverified signatureThe orphan assertion had an order-dependent false positive on ltx25_studio.lora. Two causes, both mine. module_file() mapped a package to <name>.py rather than __init__.py, so ltx25_studio.lora resolved to a file that does not exist and could never match. It did not look like a bug -- the path was plausible, it just was not there -- which is the same quiet-failure class this file exists to catch, reproduced inside the instrument meant to catch it. And a package __init__ executes only on first import, so once any earlier test had imported the lora package the in-suite tracer could never watch it run again. The package looked dead while being reached on every LoRA generation. Presence said absent because it is genuinely lazy, execution said absent because there was nothing left to execute, and the module fell through the gap between the two levels. Discovery now runs inside the same clean subprocess that already measures startup: import app, then one real generation with an image, a s…622ebdc -
test: discover unreachable modules instead of listing them
Unverified signatureThe first version checked modules somebody had thought to list. That is the weakness the blockers exploited: lora/apply.py shipped dead carrying 19 passing specs precisely because nobody thought to look for it, and a hand-written check inherits whatever blind spot its author had. This globs the package and asserts every module is reached by something -- loaded when the app starts, or executed during a generation that exercises an image, a shot row and a staged LoRA. A module wired to nothing now fails here without anyone remembering to add it, which is the only version of this check that survives its own author. Also pins stage 7 directly: lora/apply.py must execute when a request stages an adapter. That was blocker #5, and the first version did not cover it because no test staged a LoRA. Package __init__ files are counted as reached when anything inside them is: their module-level code runs once per process, so the tracer cannot watch it run a second time, but importing lora.apply …7eb7de2 -
test: assert every PLAN §7.1 module is reached, not merely present
Unverified signatureFour blockers on this build shared one signature: a module that exists, whose own tests are green, whose docstring correctly describes its job, and that nothing ever calls. zerogpu.py was never imported by the app. enforce_retention had zero call sites. conditioning.py was reachable only from a UI readout, so the generation path converted nothing. lora/apply.py had no importer at all, so stage 7 never ran. None failed a test, and none could: a dead module's unit tests pass perfectly, because the tests are the thing calling it. Two levels. Presence -- the module is in sys.modules after Version: ImageMagick 7.1.2-0 Q16-HDRI aarch64 23234 https://imagemagick.org Copyright: (C) 1999 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC HDRI Modules OpenMP Delegates (built-in): bzlib fontconfig freetype heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png raw tiff webp xml zlib zstd Compiler: clang (17.0.0) Usage: import [options ...] [ file ] Ima…74278c7