Spaces:
Running on Zero
Running on Zero
Commit History
3 days ago
-
feat: every result carries a structured run record and every failure a category, so the UI renders facts instead of parsing sentences
Unverified signatureGenerationResult.record is a frozen RunRecord of builtins (it crosses the ZeroGPU fork): mode; requested and returned width/height; frames, frame rate and seconds produced; seed; whether stage 2 ran; the decoder that ran; the audio level used; where the length came from (request, model, or the user's audio); the prompt sent after enhancement; adapters as (label, weight, attached modules); worker elapsed seconds on a monotonic clock around the whole run; and peak reserved VRAM where the probe measured it. The notes stay as they were. Every LTXStudioError carries a stable category (quota, timeout, oom, input, adapter, enhancer, bug; constants in errors.py, set per family) and gpu_used, which generate() sets False exactly for a refusal raised before dispatch. errors.categorise(exc) classifies anything reaching the UI: ours by their attributes, torch's CUDA/MPS out-of-memory as oom, the ZeroGPU platform's gr.Errors by their words (quota exceeded / illegal duration as quota, GPU task abort…c08d3e8 -
test: an error's words count as shown when the card HTML-escapes them
Unverified signatureThe rebuilt failure card puts the error's message in an HTML detail block, escaped, so an apostrophe reaches the markup as ' and a raw substring check misses a message the browser displays exactly as written. The fork-boundary specs now accept the message verbatim or HTML-escaped. The seam spec for a typed failure asserted the old headline, 'Generation failed'. It now asserts what the seam needs: no player is filled, and the error's own words are in the status. The card's headline belongs to the UI's tests. Green against the current UI and the rebuilt one, in both environments.a335bfa
4 days ago
-
test: the failure card and the stage-2 control are pinned by what they guarantee, not by their layout
Unverified signaturerender.failure was pinned to its exact old markdown (headline, class name, quoted message) and a foreign gr.Error to the word 'unexpected'. What the fork-boundary contract actually needs is narrower: the error's own message reaches the user verbatim, and the card rendered from the unpickled object is identical to the one from the object the worker raised. Both specs now assert exactly that, for our errors and for the platform's 'GPU task aborted'. The card's headline and layout belong to the UI and are pinned in its own tests. In the three modes that skip stage 2, the checkbox was pinned to interactive=False AND value=False. Hidden or disabled both tell the user the box cannot change the outcome; the value a UI writes into the field is not the guarantee. The guarantee is the backend's, already pinned in this file: a submitted enable_stage_2=True in those modes runs single stage. Where the choice is real the control must stay visible and interactive. The UI/backend agreement check uses…c4719d8
-
fix: errors survive the ZeroGPU fork boundary — the pair from SPACE_MODE_MATRIX §4
Unverified signatureOn ZeroGPU, spaces transmits a worker exception OBJECT to the parent only when isinstance(exc, gr.Error); everything else is reduced to its class name, which is how DecodeError(reason=...) reached a live user as the eleven characters 'DecodeError'. And the object crosses a multiprocessing Queue, so eligibility without picklability is strictly worse: the worker catches the PicklingError and ships THAT, losing even the class name. 22 of 27 classes were measured unpicklable (keyword-only __init__ vs a one-tuple args pickle feeds back positionally). So LTXStudioError now (a) inherits gradio.exceptions.Error and (b) defines __reduce__ rebuilding via __new__ + args + __dict__, skipping __init__. Neither half works alone; the pair is the fix. What must NOT change does not: __str__ is restored to BaseException semantics (gr.Error repr-quotes its message — the quotes around 'DecodeError' were exactly that), args arity semantics are preserved exactly, and print_exception stays True so the space…6bb211a