unsloth/studio/frontend/src
Daniel Han daaac9e10b Run video generation as a background job so secure mode's tunnel cap cannot 524 it
POST /video/generate previously held the response open for the whole
generation (multi-minute for 720p), so in --secure mode the Cloudflare
quick tunnel's ~100s origin-response cap returned a 524 while the server
kept generating, and the frontend treated the run as failed.

Generation now follows the same return-at-once pattern as /video/load:
begin_generate validates synchronously (409 on no model or on a second
concurrent generate via a new busy sentinel) and runs the existing
generate + gallery-persist pipeline, with the route's exact error
mapping, on a daemon thread. GET /video/generate-progress gains optional
terminal fields: phase completed carries the saved gallery record, phase
failed a client-safe error; active only drops together with a terminal
phase. The cancel event is registered before the worker starts so
/video/generate/cancel keeps working across the whole job.

VideoGenerateResponse becomes an accepted acknowledgement (status
started, video kept as an always-null compat field). The video page
fires the POST, then drives completion off the progress poll it already
runs (completed prepends the clip, failed surfaces the error, the
cancelled sentinel stays toast-free). The API-key training-start guards
now also probe the video backend for an in-flight background clip, since
it is no longer visible as an in-flight HTTP request to the keep-warm
counter.

Route tests keep the fake backend for load/generate/status but inherit
the real job machinery, covering immediate accept, concurrent 409, the
terminal completed record, sanitized/ValueError/cancelled failures, and
cancel of a running job.
2026-07-10 09:19:02 +00:00
..
app Add Video tab to Studio frontend 2026-07-04 13:30:42 +00:00
assets Studio: mascot images degrade gracefully instead of showing alt text (#6146) 2026-06-10 08:22:17 -07:00
components Fix picker dead-end for single-file repos, stale LoRA state after deferred compile, slash upload cap 2026-07-10 08:07:01 +00:00
config Speed up Studio startup path (#6899) 2026-07-07 18:08:07 -07:00
features Run video generation as a background job so secure mode's tunnel cap cannot 524 it 2026-07-10 09:19:02 +00:00
hooks studio: use largest single GPU for the diffusion catalog fit budget 2026-07-10 04:32:31 +00:00
i18n Merge branch 'main' into image-generation 2026-07-09 08:04:50 +00:00
lib Merge branch 'main' into image-generation 2026-07-09 08:04:50 +00:00
shared studio/frontend: make toast and inline error text selectable and copyable (#5506) 2026-05-18 03:47:21 -07:00
stores Update license headers 2026-03-12 17:23:10 +00:00
types feat(studio): implement S3 dataset loading (completes #5951) (#6222) 2026-06-12 14:52:04 +02:00
utils Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
asset-queries.d.ts Studio: mascot images degrade gracefully instead of showing alt text (#6146) 2026-06-10 08:22:17 -07:00
index.css Studio: keep code block scrollbars off one-line code (#6474) 2026-06-22 05:04:03 -07:00
main.tsx Speed up Studio startup path (#6899) 2026-07-07 18:08:07 -07:00
speech-recognition.d.ts studio: redesign chat composer (#5891) 2026-06-03 06:07:30 -07:00