unsloth/studio/backend
oobabooga d0c5cf6e07 Fix diffusion flag leak, sd-cli orphan, and native family fallback
Six correctness fixes to the diffusion stack, found reviewing the merged
phase PRs on this branch:

- load_pipeline: restore the try/finally guard around the speed/quant/
  placement span. A failure after apply_speed_optims (e.g. OOM in quant or
  the memory plan) left TF32/cudnn flags flipped process-wide and the
  half-built pipe resident in VRAM. Now restores the flags and frees VRAM
  on a failed load.
- sd-cli Popen binds to the parent (PR_SET_PDEATHSIG via child_popen_kwargs,
  matching the llama.cpp sites), so a parent crash mid-generation can't
  orphan it holding VRAM/RAM.
- Native begin_load uses the filename-fallback family detector the route
  validated with, so a local .gguf whose family keyword lives only in the
  basename no longer dead-ends 400 on a no-GPU host.
- Generate error handler matches exact sentinel messages instead of the
  "cancelled" substring, fixing a 409 misroute and a raw sd-cli output leak.
- find_sd_cpp_binary honors UNSLOTH_STUDIO_HOME/STUDIO_HOME like the
  installer, so a custom Studio home resolves.
- Drop the redundant _tf32_prev bookkeeping; snapshot/restore_backend_flags
  is now the single owner of the TF32/cudnn restore.

The two client-state messages are now shared constants so the 409-vs-500
contract can't drift. Adds a regression test for each behavioral fix.
2026-07-01 17:00:22 -03:00
..
assets Studio: require signed capability tokens for /p preview links (#6666) 2026-06-25 21:40:48 -07:00
auth Studio: harden background consumer loops and streaming paths against silent UI freezes (#6653) 2026-06-26 03:31:33 -07:00
core Fix diffusion flag leak, sd-cli orphan, and native family fallback 2026-07-01 17:00:22 -03:00
hub studio: allow updating HF models through UI (#5388) 2026-07-01 01:54:57 +03:00
loggers Studio: trim serving-log noise and surface llama-server engine stats (#6377) 2026-06-17 05:37:57 -07:00
models Studio diffusion (Phase 16): route no-GPU loads to the native sd.cpp engine (#6724) 2026-07-01 15:43:56 -03:00
plugins Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
requirements Merge remote-tracking branch 'origin/main' into image-generation 2026-07-01 10:47:21 +00:00
routes Fix diffusion flag leak, sd-cli orphan, and native family fallback 2026-07-01 17:00:22 -03:00
state Studio: shareable per-checkpoint preview links (#6486) 2026-06-24 06:31:53 -07:00
storage Whole-document context for RAG chat attachments (#6693) 2026-06-30 15:55:23 +02:00
tests Fix diffusion flag leak, sd-cli orphan, and native family fallback 2026-07-01 17:00:22 -03:00
utils studio: allow updating HF models through UI (#5388) 2026-07-01 01:54:57 +03:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
cloudflare_tunnel.py Reap Studio child processes when the parent dies abnormally (#6425) 2026-06-18 05:51:22 -07:00
colab.py Studio Colab: opt-in shareable Cloudflare tunnel link (#6684) 2026-06-26 00:56:23 -07:00
main.py Speed up Studio desktop startup (#6742) 2026-06-29 15:27:39 +02:00
run.py studio: explicit Cloudflare tunnel notice and public-exposure warning at startup (#6515) 2026-06-30 17:47:48 +02:00
startup_banner.py Tidy verbose Studio launch messages (#6628) 2026-06-24 03:49:19 -07:00