Repository navigation
Studio: Developer mode opt-in for experimental CPU video generation - #14247
Merged
Merged
Conversation
Video stays hidden on a host with no supported GPU by default. A new owner-only Settings > General > Developer mode switch (or UNSLOTH_VIDEO_ALLOW_CPU, which wins over the saved setting in both directions) lets a plain CPU-only host (video reason no_accelerator) run the video pipelines on the CPU. Detection failures, missing or broken PyTorch, Intel Macs and GPUs PyTorch cannot reach stay blocked. video_capability() reports the opt-in as supported with video_cpu_experimental, /api/health carries video_cpu_opt_in for the sidebar's Video row, and the Video page keeps a CPU (experimental) warning up while it is in effect. Enabling asks first with the warning from the issue, the host RAM against a 32 GB minimum (Wan2.1 1.3B peaked at 24.5 GiB RSS on CPU) and a measured speed estimate. Closes #9458
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 19, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 19, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 19, 2026
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
that referenced
this pull request
Oct 19, 2026
## Summary Main is over the startup bundle budget again, so `Frontend build + bundle sanity` fails on every PR based on it: ``` over the startup budget: transfer 2012.0 KB > 2011.9 KB, raw 6681.8 KB > 6680.6 KB (main at 26e246d) ``` #14247 (Developer mode opt-in for experimental CPU video generation) added 1,777 B raw / 654 B transfer to the startup chunks. It merged without raising the limits. ## Cause `#14247` touches eager startup code. Its new strings land in `i18n/locales/en.ts` (the English catalog ships in the startup chunks), and the developer-mode flag is read from `__root.tsx`, `app-sidebar.tsx`, `config/env.ts` and `config/hardware-verdict.ts`. The settings section itself is lazy. This is small real growth with no lazy home. The other commits since the last measurement (#14204, #14239, #14249) change no frontend code. ## Change - **`check-bundle-budget.ts`:** a BUDGET comment entry for #14247, and both limits moved to the measured build plus a 160 B raw / 189 B transfer margin: - `rawBytes`: 6,840,888 -> 6,842,343. - `transferBytes`: 2,060,219 -> 2,060,510. ## Testing One machine and build, Node 24, exact byte totals from the budget script. CI has matched this machine to the byte on earlier budget changes. | tree | raw B | transfer B | |---|---|---| | `88afa84b87` (before #14247) | 6,840,406 | 2,059,667 | | main `26e246d407` | 6,842,183 | 2,060,321 | - **Main against the old limits:** `over the startup budget: transfer 2012.0 KB > 2011.9 KB, raw 6681.8 KB > 6680.6 KB`. - **With this change:** `within budget (0.2 KB transfer, 0.2 KB raw to spare)`, 96 chunks.
danielhanchen
added a commit
that referenced
this pull request
Oct 19, 2026
danielhanchen
added a commit
that referenced
this pull request
Oct 19, 2026
## Summary `tests/test_formatter_fixed_point.py::test_every_tracked_python_file_is_already_formatted` fails in `Repo tests (CPU, rest)` on PRs based on current main (seen on #14229): ``` these tracked files are not a fixed point of the ruff-format-with-kwargs hook, so pre-commit.ci will fail the next PR that edits them ``` That run listed eight files. Most were reformatted on main since then. Running the hook (`scripts/run_ruff_format.py`, ruff 0.6.9 as pinned) over every tracked file inside the hook's scope, at main `6c159816c5`, leaves two: - `studio/backend/routes/settings.py`: one `logger.info(...)` call the hook joins onto one line. - `studio/backend/tests/test_video_cpu_developer_mode.py`: one `from utils.account_context import ...` the hook splits. Both came in with #14247, which merged without its pre-commit.ci format commit. ## Change The hook's own output for those two files, nothing else. No behavior change. ## Testing - **The hook over every tracked `.py`:** I ran it and then reverted everything the hook's `exclude` pattern skips (read from `.pre-commit-config.yaml` the same way the guard does). Exactly these two files remain changed. - **Running it again on this branch:** no further changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9458.
Video stays hidden on hosts without a supported GPU by default. This adds an owner-only Developer mode in Settings > General with one switch, "Allow video generation on CPU (experimental)".
UNSLOTH_VIDEO_ALLOW_CPUoverrides the saved setting in either direction.What changes
video_capability()admits only the plain CPU-only case (reasonno_accelerator) when the opt-in is on, markedvideo_cpu_experimental. Detection failures, missing or broken PyTorch, Intel Macs and GPUs PyTorch cannot reach stay blocked.PUT /api/settings/developer-mode, owner only, 403 for managed accounts; any account can read it)./api/healthcarriesvideo_cpu_opt_inso the sidebar keeps the Video row enabled once opted in.The backend video pipelines already resolve to a float32 CPU target when no accelerator is visible (the routes on
mainalready render on CPU; only the capability gate and the UI blocked it), so no inference code changes.Testing
/video/loadand/video/generateon a real Studio server: 832x480, 5 frames, 3 steps, generate 228 s on 16 threads, peak RSS 24.5 GiB (this sets the 32 GB minimum). After the owner PUT,/api/systemmoved fromno_acceleratortovideo_supported: true, video_cpu_experimental: true, and the load reported devicecpu, float32. The output matches the base tree's frame for frame (mean 141.29).wan2.1-t2v-1.3b,wan2.2-ti2v-5bandwan2.2-t2v-a14b.tscand the strict i18n parity check pass.Not verified on CPU: LTX-2 / 2.5, HunyuanVideo 1.5 and MiniMax-H3 (no tiny repos; MiniMax-H3 already runs through the CPU sd.cpp build on such hosts). A default-length clip (33 frames, 30 steps) was not timed; "hours" is extrapolated from about 27 s per denoise step at 832x480.
Screenshots
Studio started with no GPU visible (
/api/systemreportsno_acceleratoron both sides).Settings > General: AFTER adds the Developer mode section with the switch, off by default.
Turning the switch on asks first (the issue's warning, host RAM against the minimum, and the measured speed):
After confirming,
/api/systemreportsvideo_supported: true, video_cpu_experimental: truewithout a restart, and the Video page opens with the CPU (experimental) banner. BEFORE, the same host keeps the no-accelerator block: