Skip to content

video gen: make display-sleep opt-in and settable per render - #6249

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtnaxgd0/agent-1428b00e
Sep 4, 2026
Merged

video gen: make display-sleep opt-in and settable per render#6249
atomantic merged 1 commit into
mainfrom
cos/task-mtnaxgd0/agent-1428b00e

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • The GPU-watchdog display-sleep mitigation for local MLX video renders (mlx useAsyncAction's unmount guard is a no-op on React 19, and its test can't fail #3267) defaulted to ON and was settings-only — flip it to OFF by default, since a render is a short, attended action and sleeping the screen unasked reads as a crash.
  • Add a visible checkbox on the Video Gen form (shown only for models the mitigation applies to) so a user who hits the watchdog crash can opt in for just that render, without changing the install-wide default.
  • The existing Settings → Media Generation toggle still sets the install-wide default; the new per-render checkbox starts from that default and can override it either direction.
  • Refactored the shared isDisplaySleepEnabled gate (server/services/displayPower.js) to take a defaultEnabled flag, so LoRA training keeps its unrelated default-ON behavior (unattended multi-hour runs) while video gen's new wrapper (server/services/videoGen/displayPower.js) uses default-OFF — one shared darwin/flag check, two callers.

Test plan

  • server/services/displayPower.test.js, server/services/videoGen/displayPower.test.js, server/services/loraTraining/displayPower.test.js, server/routes/videoGen.test.js, server/services/videoGen/local.test.js — all pass.
  • client/src/pages/VideoGen.displaySleep.test.jsx (new) — covers the checkbox's default-from-settings behavior, per-render opt-out/opt-in, and that it's hidden for a runtime the mitigation doesn't apply to.
  • Full server suite (1949 files / 39275 tests) and full client suite (841 files / 10329 tests) pass.

The GPU-watchdog mitigation (sleeping the display during local MLX video
renders) defaulted to ON and was settings-only. A render is a short,
attended action, so sleeping the screen unasked reads as a crash — flip
the default to OFF, and add a visible per-render checkbox on the Video
Gen form (in addition to the existing Settings default) so a user who
hits the watchdog crash can opt in without changing the install default.
@atomantic
atomantic enabled auto-merge September 4, 2026 19:38
@atomantic
atomantic merged commit d514e1f into main Sep 4, 2026
29 of 72 checks passed
@atomantic
atomantic deleted the cos/task-mtnaxgd0/agent-1428b00e branch September 4, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant